Welcome back to KZbin ❤❤❤ Can you do a bigger project tutorial with this approach so we will learn from it? 💯💯💯
@RobertBrunhage3 күн бұрын
Not sure what I will do for youtube but I will sometime in the future have a open-source repo and the course will also go more in-depth on it soon as well!
@aouadicharaf10383 күн бұрын
@@RobertBrunhage Awesome!! 🚀
@krtirtho3 күн бұрын
Wait a sec...u guys test in Flutter?
@imamhatipoglu40404 күн бұрын
Welcome again, awesome contents
@kibromhs75664 күн бұрын
Tell us the theme you're using
@tayabfarooq20625 күн бұрын
Your followers eagerly look for your content that you post! Please take care of them by uploading something for them as much as possible!
@RobertBrunhage5 күн бұрын
Going to do my best haha
@atreeon5 күн бұрын
Yes to Golden tests! was waaay too slow to adopt them. Unit tests for UI stuff - yes. Also integration tests for UI stuff - better. All three? perfect!
@somevideos999995 күн бұрын
100% agree. I have always use ValueNotifier, view model, and Service Locator.
@aouadicharaf10385 күн бұрын
❤❤❤
@coffee-is-power5 күн бұрын
you should've just changed the implementaton to instead of comparing the bytes, just open the two images and compare the *pixels* not the bytes which is what flutter should do by default but it doesn't
@jayKrollin5 күн бұрын
I struggle with the exact same issue but I would highly recommend to not use a tolerance. E.g. if any dev changes a padding by 1px the related test results could be false positives.
@tbm985 күн бұрын
the pain is the result still different between OS
@RobertBrunhage5 күн бұрын
Yes, the best scenario will always be generating the tests with a single OS. I am for sure hoping people share some insights of potential better solutions. Mainly wanted to share my experience!
@arditdaku55345 күн бұрын
Welcome back!
@artofnessa5 күн бұрын
Golden tests ftw
@FlutterBountyHunters5 күн бұрын
Ignoring the variance will definitely bite you. I've had goldens that fail with a 0.0% difference where the mismatch was actually relevant. In Super Editor we've taken two steps to deal with this. First, we created a golden runner that uses Docker to get as close to matching platforms no matter who runs the tests. Second, for tests that still don't match, we created a golden matcher that lets you specify the number of mismatched pixels instead of mismatched percent, because in practice, percent diffs are unpredictable. If your golden mismatch is 103 pixels due to platform differences, then you can allow up to exactly 103 pixels difference. Otherwise it fails.
@RobertBrunhage5 күн бұрын
Pinning this. interesting, do you have some links? Would love to learn more here and make sure I share a better approach next time. Seen this approach in multiple large codebases as well so for sure those small differences could be valid, but they might also be so small that they haven't mattered.
@ant_code3 күн бұрын
@@RobertBrunhage there is the opened issue on flutter github #111739 related to M1 machines golden tests mismatch.
@LucasSilva-jd2bf9 күн бұрын
I use either Bloc or MVVM + Signals. Not a fan of other solutions such as Riverpod.
@johnstef2239 күн бұрын
I started using flutter from the initial beta version and the concept of InheritedWidgets and ChangeNotifiers which was proposed in the flutter docs was very difficult as beginner to understand. Now after 7 years of creating apps with all the mentioned "state management" solutions, I came to the same conclusion. Flutter as a framework has a very good state management solution by it self. Make a video about go_router, which I belive is the go to for navigation in Flutter. Great video. I will buy your course for support!!
@RobertBrunhage9 күн бұрын
Would of course mean a ton if you get the course for support, but will try to add more things in the end so that even you can find some small nuggets in there! Related to navigation the main ones imo are go_router and auto_route. I am still kind of conflicted on navigation in Flutter so will see when a video comes out with that haha
@1879heikkisorsa9 күн бұрын
I love MVVM, especially when using the stacked package. It's basically a convenience wrapper around ChangeNotifier, so it has not a lot of opinion in there, but reduces the amount of boilerplate code you need to build something. Also, it's super easy testible as all the code you want to test is detached from UI.
@amaanali64056 күн бұрын
Really I'm always using Stacked for every app. I love how manageable and readable my code becomes without doing or adding too much of a boilerplate.
@pedrosantos43689 күн бұрын
Part 2 video coming soon?
@pedrosantos43689 күн бұрын
It’s great to see your videos again! However, a Counter page is too simple an example to effectively demonstrate how this would scale. Part 2 video coming soon?
@malcomgreen47479 күн бұрын
Since 2019 im still using set state im doing good
@RobertBrunhage9 күн бұрын
chad
@timmyburner734512 күн бұрын
One thing I would add is exposing values from the View Model as a ValueListenable getter instead of directly using the ValueNotifier. This adds some more biolerplate but ensures all changes of the state can only happen in the View Model. Great video as always! 👍
@eftheemiss12 күн бұрын
After spending 6 years in different solutions, I also ended up in MVVM with ChangeNotifier and `context.select` from Provider for fine-grained rebuilds.
@s.bamahfoodh12 күн бұрын
Alright good, I noticed that u excluded Streams from this solution. Does that mean it will be very complex for it? I use river pod and with stream notifier it’s very fun to work with. I can listen to my steam anywhere in the app.
@RobertBrunhage12 күн бұрын
Usually streams can be a foot-gun in many scenarios but it's also a valid approach and built-in. I have nothing against it, I just think there is better approaches to 95% of the scenarios.
@HS-uy5ry12 күн бұрын
Yes this is why I use stacked .. very clean and understable!!
@1879heikkisorsa9 күн бұрын
Exactly! I love stacked for being simple and without a lot of dependencies. Just reducing boilerplate.
@paulomendesdev12 күн бұрын
using "State Patter" with ValueNotifier is one of best approachs for managing state...
@rebarius12 күн бұрын
With CLEAN Architecture I could imagine how a sample project would look like 😯👌🏼 thx
@h3w4512 күн бұрын
i still believe those state management packages pros are way better, some are even recommended by google, also the the approach almost always stays the same like bloc it's always event, and states
@kwesikwaa12 күн бұрын
this is exactly how i do it.
@oijgg3p12 күн бұрын
This is bad advice, don't do this. No one in the flutter industry is even bothering with mvvm. Use clean architecture - feature based approach.
@aymanbarghout910612 күн бұрын
It's not even advice, it's Robert's approach as the title clearly states. But mvvm is clean architecture, they are not mutually exclusive 😅 And the feature based folder structure can still be used with mvvm architecture. It's rather bold calling something bad advice while not knowing what you're talking about.
@oijgg3p12 күн бұрын
@@aymanbarghout9106 I can accept it's his opinion, but still he is sharing it, so regardless of the validity of the information, he is still sharing it. Second, mvvm is not clean architecture for flutter development. That would be as if you told me mvc (model-view-controller) is clean architecture, hello 1973, please take C back.. and honestly, saying "you don't understand" is very weak argument. He is not not even telling them to use Bloc (even though 99.9% of industry is using it), it's just not a good look when you still have this "wHaT sTaTe MaNaGeMenT yOu ShOuLd UsE".. I am telling you honestly, some kids will look at this, and try to follow this advice.. there are industry standards for a REASON, and he should at least respect that to mention that.. this is not a mainstream advice which he is giving, and beginners should know that. And to repeat again,, MVVM is NOT a clean architecture in flutter development. If you don't believe me, go speak with cloude 3.5.
@christabelredfield970312 күн бұрын
fully agreed, Clean architecture kind of old and even some famous framework likr laravel didnt do it. plus MVVM cannot be compared to Clean Architecture i think. you can do both@@aymanbarghout9106
@aymanbarghout910611 күн бұрын
@oijgg3p It's his opinion and definitely it can be wrong or even a bad one depending on who you ask but you can just say your counter approach and give reasons behind it, saying it's bad and calling it a day is not benefiting anyone, there is nothing set in stones. MVVM is a UI architecture pattern not the same as MVC and can be part of clean architecture, again they are not mutually exclusive, it's just how you architecture the presentation layer. I didn't say you don't understand, sorry if it came out that way, I said you don't know what you were talking about in this instance and I think the point still stands if your source of truth is AI and not experience - this is an assumption based on your last sentence -.
@1879heikkisorsa9 күн бұрын
Simply not true. The official flutter channel has feature stacked (which is MVVM) recently. Also, you can do feature based architecture with MVVM and even clean architecture with service locators. It's quite obvious to do it if you think about it.
@greglee770812 күн бұрын
Riverpod does caching, this is the main reason why it is useful. Most of the state management packages are unnecessary replacements for something that already exists (what you mentioned in the video: change/value notifier, listenablebuilder etc.) and are mainly just a way to promote the creator :)
@1879heikkisorsa9 күн бұрын
In my opinion you should not intertwine caching and state management. Just take react as an example: React-Query is awesome for caching, but nobody would like to have that baked into a state management solution like Redux.
@michaelamir2512 күн бұрын
Aren't most of the state management solutions we have today all about having a class for the logic (Cubit, Bloc, ChangeNotifier, etc.) and widgets to consume the state changes coming from these classes? (BlocBuilder, ConsumerWidget, etc.) What would the problem these solutions have but won't be in the solution you are suggesting in the video if It's basically the same exact pattern? I'll only lose the features these packages offer more, only to find myself rewriting them myself and reinventing the wheel. So I would rather have a team of contributors maintain and develop it for me, and don't forget I'll be able to customize the packages as they fit me anytime.
@RobertBrunhage12 күн бұрын
I did try to cover that in the video of the potential downsides of using packages vs not. People are free to use whatever approach they want. If you prefer using bloc, blocbuilder, bloc in tests etc you are free to do so or if that is riverpod or any other package. I just personally found that the overhead of those packages end up being a net negative, rather than using the primitives already in the sdk that we have had for years (this has been true in teams as well as people end up trying to utilize the packages differently, in my experience). Teams are free to choose whatever approach they see fit to make an application. But I might also note that a lot of people end up relying on those packages so hard that they forget what they actually do, which is not hard to do yourself (or difficult) and will scale, really really well.
@nested930112 күн бұрын
go with bloc and don't listen to these people they are just milking the youtube algorithm for views
@michaelamir2512 күн бұрын
@@RobertBrunhage It will mostly take the same effort to switch from the packages, or your solution to a new solution since both are following a similar pattern. When it comes to updating the packages it still didn't make sense to me because I'm not forced to update and I'll mostly do it only when I can afford to and updating is a good idea in general so I can get the improvements and new features. And when it comes to small projects, it's also a great idea to use them from the start so that I can scale the project better later.
@aidarkhabibullin290612 күн бұрын
glad I'm not the only one using this approach)
@agreensh12 күн бұрын
I think the main problem is the learning curve for each different "solution". It would have been much better if Flutter had a simpler/nicer state management system built-in, similar to SwiftUI's (the @state variables etc), which can limit their scope to pages, or whole app state (and they even have "data" state variables that automatically get saved/restored from disk by the system).
@RobertBrunhage12 күн бұрын
Hard agree. The lack of recommendations are nice in some aspects and in other aspects, not so much
@Scotthutchinsonking12 күн бұрын
I am pretty sure NETFLIX uses Flutter and Dart ....
@haseebkahn481112 күн бұрын
After being frustrated with stateful widget for years and then moving to riverpod. i found that provider is by far the simplest and most convincing state management tool for me. there is so much little state management jargon to get used to, jargon that comes with riverpod, getx, mobx etc
@TheBadFred12 күн бұрын
So no more Riverpod necessary?? Or could it still be useful?
@RobertBrunhage12 күн бұрын
You are free to use whatever you want. I just found personally that it's usually a higher burden on the codebase than it needs to be.
@TheBadFred12 күн бұрын
@@RobertBrunhage I am intrigued. I should give it a try in a typical to-do-app.
@TheBadFred12 күн бұрын
After one year of silence, what a surprise! just watched an older video about records in Dart3 today.
@RobertBrunhage12 күн бұрын
Sweet, maybe I shouldn't take a 1 year break again haha
@TheBadFred12 күн бұрын
@@RobertBrunhage Well, you could, but I would prefer some new content too.
@tadaspetra12 күн бұрын
He's backkkk!!
@artofnessa12 күн бұрын
It’s good to see your videos again🎉
@hydrilara27 күн бұрын
A lot of non sensical garbage. Why can't they keep things simple instead of shoving garbage code on every other iteration.
@Rockem123429 күн бұрын
How do you run flutter tests from inside nvim? I'm struggling with it :(
@msiprime29 күн бұрын
True, All you need is a 4k oled big enough... good quality one screen....
@msiprime29 күн бұрын
so how would you handle it ????
@bloodbank866Ай бұрын
How to use Localization, please help me... the way you suggested. Do we not have to write manually both english and spanish text?
@yorjansandoval9381Ай бұрын
se puede usar el inspector de widgets en neovim? yo no he podido usar neovim para flutter por esa razon.
@brotendo-wf4hbАй бұрын
I use multiple monitors and multiple virtual desktops. Each monitor is dedicated to particular tools I use regularly (VSCode in the center, on the left is chrome that has my email, calendar, chat, tasklist, and chatgpt) and on the right is also chrome usually looking at documentation or stack overflow. Bottom monitor keeps my file explorer open, the top monitor is both github desktop and console running the localhost version of the server i work on. I then use virtual desktops to segregate relevant windows by the task they're relevant to. So if i have a meeting, i don't have to minimize the windows i'm using in my github-issue desktop, i just switch to a new desktop and open my note taking app, meeting app, etc
@genes-p9hАй бұрын
very helpful ty
@quinncavill67452 ай бұрын
Do you know what enables this comments of the widget name at the closing brackets of the widget :) ?