Yeeeaaahhhh!! that's great to hear man. I think it's a pretty important concept as well. It allows you to get more work done at a high level before moving into the actual implementation. It's a very speedy way of development.
Very useful information. Thank you. Every developer should know these things about abstractions and how they simplify the development process. This is huge.
This is awesome! Great strategy. The great part of this technique is that by using the fake_implementation you already have a robust set of mock data to test against. Liked and subscribed!
Exactly! It sets you up so that you can continue development when your environment is down and makes your unit testing much easier given your data setup is complete. Thanks for subscribing.
I hope so man. I was a bit worried that the video will be boring because of the content and lack of code, but I'm happy to see it'll be helping devs. It's a very important concept to get to the next level of an architecture.
Great video! As a .Net developer, i really hate the lack of interfaces in dart. i Hope google makes this improvement in the future. Until then abstract classes are the best way around.
What's the difference. Also .NET developer. I get the difference in .NET, but what would the use case be here? In Dart you can implement multiple abstract classes, You can do dependency injection with abstract classes. It doesn't seem to have much in common with abstract classes in C#. When you label a class as abstract it really behaves like an interface as it ignores all implementation. Only when you extend a class does it behave like C# abstract class.
The most thorough explanation of Flutter. This is all your videos. Great work, the only person on RUclips that gives production level tutorials. If I could change one thing.... Using provider only since it is recommended by Google. Thanks , I can figure out how to swap get it out in your other videos.
Thank you very much for your kind words. I do use provider, in all my videos :) I also use get_it with provider because it provides better readability to me and my team. I know provider can do the same things, but it doesn't read as well as a get_it locator file or get_it's service location in a viewmodel. For the team at FilledStacks it helps a lot to have readable code because you might have to dive into a code base that's a year old if no-one else has time to implement the feature so readability is top on my list for a maintainable software agency team.
@@FilledStacks that is just 1% that I would change out of the 99% that I wouldn't. My difficulty understanding Get It and your Filled Stacks Provider Architecture comes from me being a newbie. If you are bored one day, and want to throw the newbies a bone, please do an app using provider only, crud, Google/Email sign in and Firebase Storage. I would even pay for a tutorial from you with an app like that. Please let me know I am very interested and would like to work something out. Your architecture is impressive
@@ericdrodgers Thanks. I have done a provider only architecture ( ruclips.net/video/VgrK_LlQRJ4/видео.html ) after you watch that video you'll be able to see the difference. All you'll change is you'll be injecting the services through the constructor instead of getting it from the locator in get it. That's the only difference. You don't have to pay for anything, it's all free and I've already made the video for provider only implementations. See if it's easier to understand :)
@@FilledStacks Link doesn't work. More than likely it's the Provider V3, I watched it and I use it without get it. Maybe a full a app without Get It and Provider Architecture with Firebase Firestore and Storage Crud. That is a wishlist, you are doing a wonderful job, I have zero complaints. I imagine most people would like to see how YOU would put a full app together without Provider Architecture and Get It with Firebase Firestore and Database Crud. Again this is a wishlist. We newbies don't really use Get It or the Provider Architecture so it is a wishlist. Also, thanks for replying, I appreciate the replies from the Flutter God, thank you.
@@ericdrodgers Link should work now. The last parenthesis was taken as apart of the link. If that't the wish then most people should probably watch my Firebase and Flutter series to see how I put together a full mobile application. I released episode 9 this morning :)
I love your tutorials ! .. I have one question ... i always see you using both GetIt and Provider ... Do you use both packages in your production apps ? Or ... which one is better when it comes to dependency injection packages ???
Thank yoooouuuu! I use it like this setup (ruclips.net/video/kDEflMYTFlk/видео.html) exactly. I use Provider for the statemanagement (ChangeNotifier) and get_it for service location / dependency injection depending on how it's setup. It's personal preference. I feel like the ProxyProvider code for dependency injection is too verbose, hard to maintain and is waaaaay to complicated for literally no added benefit over get it where it's all basically one line. Registration / injection / location and maintenance. I don't like more code for less functionality so I still use both until Provider can become less verbose and injecting Providers where there is no context becomes easier than the current ProxyProvider setup.
Thank you. Abstraction has nothing to do with any implementation details that's the point of it. You can keep a user logged in by keeping a token stored in secure local storage that you use on startup to login again or make all your requests with. Any way you prefer to implement won't matter. Because you have abstraction :)
This is a GREAT video. extremely useful. thank you. I would really love if you could expand on this abstraction with Provider. and how i can still listen and all. but great video.
The functionality i showed doesn't take away any of Providers existing functionality. There's nothing to change to make it listen and all that. Everything else stays exactly the same you'll just use your interfaces instead of the implementation so anything else stays the same.
Hi Dane! Can you add an explanation of how 'provider_setup.dart' is used in the building app? You have coded that file but hasn't been used in any files.
Hi Gus. This video goes over my architecture using Provider only for dependency injection and state management. ruclips.net/video/VgrK_LlQRJ4/видео.html
Nice vid mate! I do, however have a question. Repeating the boolean in two different files is my main concern right now with this implementation, I think it would be better if you could somehow set the environment for your app. I have being taking ROTGP's approach (github.com/ROTGP/flutter_environments) but I'm certain that mixing it with get it and your own approach could be the base of something really good.
I don't know how I missed this comment. RUclips notifications suck! Thanks for letting me know about this approach, the code I presented wasn't entirely production ready. It was more about understanding abstraction so that you can speed up development. The link you posted here doesn't exist anymore.
@@FilledStacks No problem, in any case, the approach I linked was deprecated since Flutter now has a feature to create flavors, I guess it would be a good idea for a video. You can check it out in here flutter.dev/docs/deployment/flavors and medium.com/@animeshjain/build-flavors-in-flutter-android-and-ios-with-different-firebase-projects-per-flavor-27c5c5dac10b or flutter-academy.com/build-flavors-environment-specific-configuration/ . In any case, it's something to think about and discuss, feel free to ping me if you want to talk about it.
Hi, I noticed going through your tutorials that sometimes you use a Final properties in the data model (using it as an immutable object) and sometimes as standard properties... So which one do you recommend and why?
Both. If your value will be updated during the lifecycle of your model then you CANT use final because it can only be assigned one value. If you value will won't be updated then use final.
@@FilledStacks ok got that thanks. Is there any performance advantages (or any other advantages you know about) for using immutable models? i.e. is it better to do it this way: create a new model (with final properties) with the updated values each time the model needs to be updated of course; rather than just updating the model the usual way?
@@drimadoh It's definitely more maintainable knowing that the only way to update the values is through the constructor. It'll be easier to debug and log in a single place where values are updated.
I see you are using get_it with provider package. As you know Provider package has also ProxyProvider for dependency injection, Is there a special reason for it? ( except get_it not need context)
I do use get_it mostly. I explain the reasoning in my architecture videos. Mostly the amount of code required to maintain ProxyProvider injection is a lot more, meaning much more than get_it as well as the fact that it's easier to read and understand what you're doing with get it (for beginners, or any dev that might want to help on a project). It's all personal preference, which is why I made an architecture video covering provider + getit setup and then when v3 was released with ProxyProvider I covered that as well. I still prefer get it over ProxyProvider personally. It's been much easier to use, handle, maintain (especially with constructor signature changes) etc.
hi! Love your tutorials, but in this there seems to be an issue for me. Using getit I get an error about constructor and using provider way I get another error. GetIt error: The class 'GetIt' doesn't have a default constructor. Try using one of the named constructors defined in 'GetIt'. Thank you EDIT: I just tried doing it like this: GetIt locator = GetIt.instance; instead of: GetIt locator = GetIt(); Is this the correcxt way of using it now. I mean there are no errors now :)
Thank you. It depends on what you're handling. Try catch with good logging works well. If the user needs feedback, either a snack notification or a toast or a dialog will work. You can watch my logging video and dialog service and combine those two.
@@FilledStacks thanks a lot.. what about if the API returns different kinds of error.. for example, the api can return a json like { .errors: {} } and sometimes will return {error: {}} and what if it returns a html error file for example.. how do we properly handle these kind of stuffs
@@oliverbytes It's all dependent on your app. If you want to display it you display it, if you want to log it then you log it. If the user has to choose the next action then present a confirmation dialog with options. There's no specific rule for that. If you have a structure to your errors just check if it's there then perform the action you'd like to take.
Hey, we don't use BLoC in production so I have no experience with it. But the point of this video is to write code in an abstracted manner regardless of the state management you're using. It'll be the exact same video. it's not based on a specific state management setup, I just happen to use the one we like to use. But it can be applied to anything you're using.
@@FilledStacks Thanks a lot... I want to know the best/proper way possible on how to implement a constants file, globals file, utils file in a project.. should we create a singleton for a Utilities class or just static class? a library file? those kind of stuffs.. would really appreciate it.. thanks so much for your great tutorials I'm sure you're helping a lot of developers like me doing more proper coding...
@@FilledStacks Maybe an example of a Utils file that can do useful stuffs like generating MD5, writing and reading from files, getting user agent, getting the current platform name etc... I'm curious how you would set up
@@oliverbytes Oh, you want specific implementations. I thought you meant more around name spacing and all that. To do what you mention I just wrap my functionality into a service like my latest video for any package and use it through my service. There's nothing special I do there. Encryption and getting files I all do through using a package that I wrap up in a service.
Build 10 basic apps using only the flutter knowledge you have. That should show you what you don't know yet then you spend another 6 months improving those apps. When you're done with that do it all over but using additional software principles like SOLID
@@FilledStacks Thanks, can you please let me know how to design ui that fit every screen and set the width, height and font size according to the device/screen. I have used media query but that is working fine in some devices and awful in some. Thanks for your help 👍
@@Droidates Yes, watch me responsive UI architecture or the responsive UI video for Flutter web. It shows you how to use my responsive_builder package.
Hi Dane help me out, I read some java tight and loose coupling article which will be same in dart too I think. I had certain doubts in loose coupling watched several youtube video and article but still couldn't grasp certain points. I will explain what i understood and what confuses me . In loose coupling we restrict the direct coupling between classes. But in tight coupling we are bound to classes. Let's take an example. I have one Main class and another different class with the name Apple. I am creating a instance of this class in Main class by Apple apple =new Apple(); //Apple is tightly coupled to Main class apple.eat(); //If eat method signature is Changed to drink in the Apple class ofcourse we need to change the method name here in Main class also right?. Let's see loose coupling class interface Fruits{ void drink(); } Class Apple implements Fruits { @Override public void drink (){ Printing some message; } } class Main{ public static void main(String [] args){ Fruits apple = new Apple (); //loose coupled ?? apple.drink(); } } If i Change the method signature in loose coupling from drink to pour . I need to change the code in 3 different places. 1. method signature inside Fruits interface(drink to pour) 2.class Apple(method override from drink to pour) 3.inside Main class(method call from apple.drink to apple.pour) What's the point of using loose coupling here. In tight coupling once I modify the coupled class(Apple) i am forced to update the Main class. In loose coupling also I am doing the same process .what's the point of using it. The only benefit that I can feel through loose coupling is the interface reference type .for example Tight coupling code Main class{ //boiler plate code Apple apple = new Apple(); } In future if i create Mango class i need to create another object in Main class like Mango mango = new Mango(); Loose coupling code Main class{ //boiler plate code Fruits apple =new Apple(): //In future if i Change Apple() to Mango() no error will occur here because of the interface reference type(Fruits). } And what is code extensibility in interface if i introduce new method signature all dependents are broken and force us to implement the new method. Then how to safely extend interface without breaking existing code Please help me to understand with this fruit analogy even with Java or dart.
Hey, awesome questions and it's good that you're thinking about it. I won't be able to answer all of it because the reply on youtube doesn't lend it self to long answers in the notification bar. But there are some general points that I want to say. 1. Removing hard dependencies (tight coupling) works better for maintenance of your business logic. If you write your business logic against an interface, regardless of how it's implemented or if the names of that interface will change it provides a much more objective way to determine failure points or swap out implementations as needed (which doesn't happen often) 2. It makes your code unit testable. If you have a hard dependency on an implementation it means you can't mock it out when you want to write automated tests .Unit, integration or end-to-end. This means you have a heavy burden of manually testing all your product code through the user interface provided, whether that's a mobile app, cli or website. Which is prove to be thousands of times longer than unit tests. This means everytime you change something in that implementation class (if you'll HAVE to do regression if quality is a priority for your work). I don't quite know exactly how to answer your questions but I can say, from my experience, if you don't see the requirement for something in your code then you probably don't need it. I live by solving a problem when you have one and not solving a problem that you could potentially have, if something had to happen in a scenario that might appear. Write code the way you want and then slowly apply design principles when you feel the pain of doing things a certain way. For instance, if you at somepoint say, I don't want to spend 7 hours testing my code manually anymore I'm gonna write tests to cover all the functionality I find critical. You will HAVE to remove the hard dependencies so you can mock out those responses when the test are running. Until then you really won't need it if you don't see the value in it. Don't do things just because they're written somewhere and considered to be good practice. Use your own assessment of it, and apply as you see fit.
Hi, I love your contents. But if possible, can you please remove or lower the volume of the background music as it is somehow distracting? Thanks a lot for your videos. :)
Hey, thanks for the feedback. I have been lowering it progressively but it also only plays when I'm not coding. I'll make it even softer if possible in the next video.
@@uptourgames3735 Hey, what would a video like that have in it? I just followed the steps on the app store / playstore as they ask things I make it. Nothing specific that I do
The SingleChildCloneableWidget interface is removed, and replaced by a SingleChildWidget interface and two implementations: SingleChildStatelessWidget SingleChildStatefulWidget
@@Pheenam I appreciate the consideration. It helps getting those updates in the comments. I can't keep up with all the changes in the framework as it changes.
haha, do you understand the concept of registering an implementation against an interface and developing against the interface and not the implementation?
Best videos for mobile app dev in entire youtube . GREAT 😍😍😍😍😍
Yeeeaaahhhh!! that's great to hear man. I think it's a pretty important concept as well. It allows you to get more work done at a high level before moving into the actual implementation. It's a very speedy way of development.
Man, you don't know how useful it is to me. Great vid !
Awesome! That's great news. Happy i could help. Thank you for the feedback.
Very useful information. Thank you. Every developer should know these things about abstractions and how they simplify the development process. This is huge.
Thank you Renion. I think so too. It's a great help when coming up with certain solutions
Great. Please upload video on unit testing with mock data. With dependency injection.
That's planned as the next video 😊
@@FilledStacks Awesome. Thanks 👍
@@FilledStacks can't wait
Dude, I was researching about this today only. This is so awesome!
I am so lucky.
That's awesome 😎 i was hoping more people would be interested in this topic. Thank you for letting me know
This is awesome! Great strategy. The great part of this technique is that by using the fake_implementation you already have a robust set of mock data to test against. Liked and subscribed!
Exactly! It sets you up so that you can continue development when your environment is down and makes your unit testing much easier given your data setup is complete.
Thanks for subscribing.
Excellent stuff. This whole series on abstraction is going to be awesome and will be helpful for a lot of people.
I hope so man. I was a bit worried that the video will be boring because of the content and lack of code, but I'm happy to see it'll be helping devs. It's a very important concept to get to the next level of an architecture.
Great video! As a .Net developer, i really hate the lack of interfaces in dart. i Hope google makes this improvement in the future. Until then abstract classes are the best way around.
Yep. I come from the same land as well. Xamarin, Mvvm cross, .net core, ASP and Service Fabric. Interfaces are definitely missed :(
What's the difference. Also .NET developer. I get the difference in .NET, but what would the use case be here?
In Dart you can implement multiple abstract classes, You can do dependency injection with abstract classes. It doesn't seem to have much in common with abstract classes in C#. When you label a class as abstract it really behaves like an interface as it ignores all implementation. Only when you extend a class does it behave like C# abstract class.
As usual, great video. Your website, the slack channel and RUclips videos have become the go to place for great concepts.
Yeeeaaah! Thank you 😊 And thanks for always watching and giving feedback. I really appreciate it 😉
The most thorough explanation of Flutter. This is all your videos. Great work, the only person on RUclips that gives production level tutorials. If I could change one thing.... Using provider only since it is recommended by Google. Thanks , I can figure out how to swap get it out in your other videos.
Thank you very much for your kind words. I do use provider, in all my videos :) I also use get_it with provider because it provides better readability to me and my team. I know provider can do the same things, but it doesn't read as well as a get_it locator file or get_it's service location in a viewmodel. For the team at FilledStacks it helps a lot to have readable code because you might have to dive into a code base that's a year old if no-one else has time to implement the feature so readability is top on my list for a maintainable software agency team.
@@FilledStacks that is just 1% that I would change out of the 99% that I wouldn't. My difficulty understanding Get It and your Filled Stacks Provider Architecture comes from me being a newbie.
If you are bored one day, and want to throw the newbies a bone, please do an app using provider only, crud, Google/Email sign in and Firebase Storage. I would even pay for a tutorial from you with an app like that. Please let me know I am very interested and would like to work something out. Your architecture is impressive
@@ericdrodgers Thanks. I have done a provider only architecture ( ruclips.net/video/VgrK_LlQRJ4/видео.html ) after you watch that video you'll be able to see the difference. All you'll change is you'll be injecting the services through the constructor instead of getting it from the locator in get it. That's the only difference. You don't have to pay for anything, it's all free and I've already made the video for provider only implementations. See if it's easier to understand :)
@@FilledStacks Link doesn't work. More than likely it's the Provider V3, I watched it and I use it without get it. Maybe a full a app without Get It and Provider Architecture with Firebase Firestore and Storage Crud. That is a wishlist, you are doing a wonderful job, I have zero complaints. I imagine most people would like to see how YOU would put a full app together without Provider Architecture and Get It with Firebase Firestore and Database Crud. Again this is a wishlist. We newbies don't really use Get It or the Provider Architecture so it is a wishlist. Also, thanks for replying, I appreciate the replies from the Flutter God, thank you.
@@ericdrodgers Link should work now. The last parenthesis was taken as apart of the link. If that't the wish then most people should probably watch my Firebase and Flutter series to see how I put together a full mobile application. I released episode 9 this morning :)
I love your tutorials ! .. I have one question ... i always see you using both GetIt and Provider ... Do you use both packages in your production apps ? Or ... which one is better when it comes to dependency injection packages ???
Thank yoooouuuu! I use it like this setup (ruclips.net/video/kDEflMYTFlk/видео.html) exactly. I use Provider for the statemanagement (ChangeNotifier) and get_it for service location / dependency injection depending on how it's setup. It's personal preference. I feel like the ProxyProvider code for dependency injection is too verbose, hard to maintain and is waaaaay to complicated for literally no added benefit over get it where it's all basically one line. Registration / injection / location and maintenance. I don't like more code for less functionality so I still use both until Provider can become less verbose and injecting Providers where there is no context becomes easier than the current ProxyProvider setup.
@@FilledStacks Thank you, master !
This is awesome! thanks, i really like this approach. But i have a question, how to keep user logged with this approach?
Thank you. Abstraction has nothing to do with any implementation details that's the point of it. You can keep a user logged in by keeping a token stored in secure local storage that you use on startup to login again or make all your requests with. Any way you prefer to implement won't matter. Because you have abstraction :)
This is a GREAT video. extremely useful. thank you.
I would really love if you could expand on this abstraction with Provider. and how i can still listen and all. but great video.
The functionality i showed doesn't take away any of Providers existing functionality. There's nothing to change to make it listen and all that. Everything else stays exactly the same you'll just use your interfaces instead of the implementation so anything else stays the same.
Hi Dane!
Can you add an explanation of how 'provider_setup.dart' is used in the building app? You have coded that file but hasn't been used in any files.
Hi Gus. This video goes over my architecture using Provider only for dependency injection and state management. ruclips.net/video/VgrK_LlQRJ4/видео.html
Do you have an example of this working in Stacked instead of Provider at 11:32?
Yes, in stacked you supply the dependency to the dependencies list of the StackedApp annotation.
Nice vid mate! I do, however have a question. Repeating the boolean in two different files is my main concern right now with this implementation, I think it would be better if you could somehow set the environment for your app. I have being taking ROTGP's approach (github.com/ROTGP/flutter_environments) but I'm certain that mixing it with get it and your own approach could be the base of something really good.
I don't know how I missed this comment. RUclips notifications suck! Thanks for letting me know about this approach, the code I presented wasn't entirely production ready. It was more about understanding abstraction so that you can speed up development. The link you posted here doesn't exist anymore.
@@FilledStacks No problem, in any case, the approach I linked was deprecated since Flutter now has a feature to create flavors, I guess it would be a good idea for a video. You can check it out in here flutter.dev/docs/deployment/flavors and medium.com/@animeshjain/build-flavors-in-flutter-android-and-ios-with-different-firebase-projects-per-flavor-27c5c5dac10b or flutter-academy.com/build-flavors-environment-specific-configuration/ . In any case, it's something to think about and discuss, feel free to ping me if you want to talk about it.
Hi, I noticed going through your tutorials that sometimes you use a Final properties in the data model (using it as an immutable object) and sometimes as standard properties... So which one do you recommend and why?
Both. If your value will be updated during the lifecycle of your model then you CANT use final because it can only be assigned one value. If you value will won't be updated then use final.
@@FilledStacks ok got that thanks. Is there any performance advantages (or any other advantages you know about) for using immutable models? i.e. is it better to do it this way: create a new model (with final properties) with the updated values each time the model needs to be updated of course; rather than just updating the model the usual way?
@@drimadoh It's definitely more maintainable knowing that the only way to update the values is through the constructor. It'll be easier to debug and log in a single place where values are updated.
I see you are using get_it with provider package. As you know Provider package has also ProxyProvider for dependency injection, Is there a special reason for it? ( except get_it not need context)
I do use get_it mostly. I explain the reasoning in my architecture videos. Mostly the amount of code required to maintain ProxyProvider injection is a lot more, meaning much more than get_it as well as the fact that it's easier to read and understand what you're doing with get it (for beginners, or any dev that might want to help on a project). It's all personal preference, which is why I made an architecture video covering provider + getit setup and then when v3 was released with ProxyProvider I covered that as well. I still prefer get it over ProxyProvider personally. It's been much easier to use, handle, maintain (especially with constructor signature changes) etc.
@@FilledStacks thanks for detailed answer. I will check your videos.
Another fantastic video. Thank you FilledStacks!
Thank you, Tyler! 🙏
hi! Love your tutorials, but in this there seems to be an issue for me. Using getit I get an error about constructor and using provider way I get another error. GetIt error: The class 'GetIt' doesn't have a default constructor.
Try using one of the named constructors defined in 'GetIt'.
Thank you
EDIT:
I just tried doing it like this:
GetIt locator = GetIt.instance;
instead of:
GetIt locator = GetIt();
Is this the correcxt way of using it now. I mean there are no errors now :)
Thank you! And yes, that's the correct way. It was updated a bit after this episode came out.
Super great tutorial! Please do one for Error Handling soon? What's the most proper way to handle exceptions please.
Thank you. It depends on what you're handling. Try catch with good logging works well. If the user needs feedback, either a snack notification or a toast or a dialog will work. You can watch my logging video and dialog service and combine those two.
@@FilledStacks thanks a lot.. what about if the API returns different kinds of error.. for example, the api can return a json like { .errors: {} } and sometimes will return {error: {}} and what if it returns a html error file for example.. how do we properly handle these kind of stuffs
@@oliverbytes It's all dependent on your app. If you want to display it you display it, if you want to log it then you log it. If the user has to choose the next action then present a confirmation dialog with options. There's no specific rule for that. If you have a structure to your errors just check if it's there then perform the action you'd like to take.
@@FilledStacks I get your point it all depends to us individually.. anyway I really appreciate everything you do.. thanks a lot
I wonder how the theoretical part was not boring many thanks for sharing your information
Hahaha i was literally thinking it's going to be so boring but it seems that it's not 😊 thanks for watching. I'm happy to share the knowledge 😁
The best part of the video 0:00 to 5:41 :)
haha, I thought it would be the most boring part :) Thanks man
Bro this is awesome! Thanks for providing so much value
It makes me happy to hear that man. Thanks for letting me know.
can you make a video on Bloc pattern , also tell how can we make use of bloc pattern along with this kind of abstraction
thanks in advance
Hey, we don't use BLoC in production so I have no experience with it. But the point of this video is to write code in an abstracted manner regardless of the state management you're using. It'll be the exact same video. it's not based on a specific state management setup, I just happen to use the one we like to use. But it can be applied to anything you're using.
@@FilledStacks thank you so much for reply, I will try to use with bloc pattern
@@harishkandekar1098 You're welcome :)
Can you please do a tutorial about doing Globals, Constants, Utils, Singletons stuffs?
Ill add it to my list. What specifically do you want to know?
@@FilledStacks Thanks a lot... I want to know the best/proper way possible on how to implement a constants file, globals file, utils file in a project.. should we create a singleton for a Utilities class or just static class? a library file? those kind of stuffs.. would really appreciate it.. thanks so much for your great tutorials I'm sure you're helping a lot of developers like me doing more proper coding...
@@FilledStacks Maybe an example of a Utils file that can do useful stuffs like generating MD5, writing and reading from files, getting user agent, getting the current platform name etc... I'm curious how you would set up
@@oliverbytes Oh, you want specific implementations. I thought you meant more around name spacing and all that. To do what you mention I just wrap my functionality into a service like my latest video for any package and use it through my service. There's nothing special I do there. Encryption and getting files I all do through using a package that I wrap up in a service.
@@oliverbytes Okay, I'll do a tutorial on name spacing and how I handle it.
I need this. Thanks for this awesome video.
You're welcome 😁
I am a beginner, how to learn advance flutter?
Build 10 basic apps using only the flutter knowledge you have. That should show you what you don't know yet then you spend another 6 months improving those apps. When you're done with that do it all over but using additional software principles like SOLID
@@FilledStacks Thanks, can you please let me know how to design ui that fit every screen and set the width, height and font size according to the device/screen.
I have used media query but that is working fine in some devices and awful in some.
Thanks for your help 👍
@@Droidates Yes, watch me responsive UI architecture or the responsive UI video for Flutter web. It shows you how to use my responsive_builder package.
Awesome !!! thanks ,
can you please add a working example too with github link
You can check it out at github.com/filledstacks/flutter-tutorials
Hi Dane help me out, I read some java tight and loose coupling article which will be same in dart too I think. I had certain doubts in loose coupling watched several youtube video and article but still couldn't grasp certain points. I will explain what i understood and what confuses me . In loose coupling we restrict the direct coupling between classes. But in tight coupling we are bound to classes. Let's take an example. I have one Main class and another different class with the name Apple. I am creating a instance of this class in Main class by
Apple apple =new Apple();
//Apple is tightly coupled to Main class
apple.eat();
//If eat method signature is Changed to drink in the Apple class ofcourse we need to change the method name here in Main class also right?.
Let's see loose coupling
class interface Fruits{
void drink();
}
Class Apple implements Fruits {
@Override
public void drink (){
Printing some message;
}
}
class Main{
public static void main(String [] args){
Fruits apple = new Apple ();
//loose coupled ??
apple.drink();
}
}
If i Change the method signature in loose coupling from drink to pour . I need to change the code in 3 different places.
1. method signature inside Fruits interface(drink to pour)
2.class Apple(method override from drink to pour)
3.inside Main class(method call from apple.drink to apple.pour)
What's the point of using loose coupling here. In tight coupling once I modify the coupled class(Apple) i am forced to update the Main class. In loose coupling also I am doing the same process .what's the point of using it.
The only benefit that I can feel through loose coupling is the interface reference type .for example
Tight coupling code
Main class{
//boiler plate code
Apple apple = new Apple();
}
In future if i create Mango class i need to create another object in Main class like Mango mango = new Mango();
Loose coupling code
Main class{
//boiler plate code
Fruits apple =new Apple():
//In future if i Change Apple() to Mango() no error will occur here because of the interface reference type(Fruits).
}
And what is code extensibility in interface if i introduce new method signature all dependents are broken and force us to implement the new method. Then how to safely extend interface without breaking existing code
Please help me to understand with this fruit analogy even with Java or dart.
Hey, awesome questions and it's good that you're thinking about it. I won't be able to answer all of it because the reply on youtube doesn't lend it self to long answers in the notification bar. But there are some general points that I want to say.
1. Removing hard dependencies (tight coupling) works better for maintenance of your business logic. If you write your business logic against an interface, regardless of how it's implemented or if the names of that interface will change it provides a much more objective way to determine failure points or swap out implementations as needed (which doesn't happen often)
2. It makes your code unit testable. If you have a hard dependency on an implementation it means you can't mock it out when you want to write automated tests .Unit, integration or end-to-end. This means you have a heavy burden of manually testing all your product code through the user interface provided, whether that's a mobile app, cli or website. Which is prove to be thousands of times longer than unit tests. This means everytime you change something in that implementation class (if you'll HAVE to do regression if quality is a priority for your work).
I don't quite know exactly how to answer your questions but I can say, from my experience, if you don't see the requirement for something in your code then you probably don't need it. I live by solving a problem when you have one and not solving a problem that you could potentially have, if something had to happen in a scenario that might appear.
Write code the way you want and then slowly apply design principles when you feel the pain of doing things a certain way. For instance, if you at somepoint say, I don't want to spend 7 hours testing my code manually anymore I'm gonna write tests to cover all the functionality I find critical. You will HAVE to remove the hard dependencies so you can mock out those responses when the test are running. Until then you really won't need it if you don't see the value in it. Don't do things just because they're written somewhere and considered to be good practice. Use your own assessment of it, and apply as you see fit.
@@FilledStacks Thanks alot for taking your time for replying me Dane💜
Awesome, Awesome, Awesome!
😊
Hi, I love your contents. But if possible, can you please remove or lower the volume of the background music as it is somehow distracting?
Thanks a lot for your videos. :)
Hey, thanks for the feedback. I have been lowering it progressively but it also only plays when I'm not coding. I'll make it even softer if possible in the next video.
Superb
Thank you
Very helpful 😊
That's Good news. Exactly what I'm trying to do.
awesome Thanks !!! tutorial can u please add working example with a git link
This had no actionable code so I don't think there's a git link for it. But you can go check at github.com/filledstacks/flutter-tutorials
Great tutorial :)
Thank you :)
By interfaces, you mean UI right?
No, I mean an interface. The public facing API from a class. All public parts of a class, the functions, getters, setters or properties.
@@FilledStacks Thanks. Just wanted to confirm. KEEP UP THE GREAT WORK
@@uptourgames3735 You're welcome! And thank you. I will try my best to keep making videos.
@@FilledStacks HEY! Can you do a video of 'Preparing to build a production-ready app?;
@@uptourgames3735 Hey, what would a video like that have in it? I just followed the steps on the app store / playstore as they ask things I make it. Nothing specific that I do
The SingleChildCloneableWidget interface is removed, and replaced by a SingleChildWidget interface and two implementations:
SingleChildStatelessWidget
SingleChildStatefulWidget
Thanks for sharing Nam!
@@FilledStacks Thank you for your videos!!
No worries, was having an issue and thought others might as well
@@Pheenam I appreciate the consideration. It helps getting those updates in the comments. I can't keep up with all the changes in the framework as it changes.
Genius bro
😎 thank you 😊
nice..
Dopeness! 😎
My problem is that i only understand using examples 😅
haha, do you understand the concept of registering an implementation against an interface and developing against the interface and not the implementation?
Hi, sent you an email about working with you on a long-term flutter project. Please get back to me soon. Thank you!
Awesome. I will get back to you as soon as it's mail time. Which is now :)
Praat met 'n Afrikaanse aksent, of hou jou bêk. :) Lekker vids.
haha Dankie 😁 Afrikaanse aksent kanie weg gesteek word nie 😛
My bru waar in SA is jy... dont hide the accent lol
Haha ek sal nog nooit my accent weg steek nie, I'm too proud of it 😬.... ek is in Western Cape.