@@ResoCoder By TDD it meant that test drives the design. But I am confused by the fact that in this tutorial you have not written UI test or integression tests. Just the unit tests which will drive our business logic but not UI or it's logic. It will be really useful if we get a bigger project to get more of this tutorial. Your tutorial and teaching methodology is really great. Thanks. Also, adding your references for creating this tutorial in description will also help us to get into more details.
Before watching this tutorial, I thought that I was not a professional flutter programmer, after watching it I realized that my thoughts were correct. Thanks to the author, I learned a lot of things
Hey hi, iam just begginer. I complete flutter begginer course in net ninja . Do u need any further things to take this course. Plse show me a path , I follow docs now, but I have idea of nothing I got.
33:04 for the lastest version of equatable instead of NumberTrivia({@required this.text, @required this.number}) : super([text, number]); the new way to pass the parameters is through an override of props --> NumberTrivia({@required this.text, @required this.number}); @override List get props => [text, number]; Just something I noticed while following the tutorial
Seriously man, you're my preferred content creator about flutter. I love your way to explain things. It's always clear and without any glitch disturbing the learning curve ! Keep up the good work dude !
I would have paid good money for this course. Just finished the video version, now I am going to go through the written version a few times. This guy is SOLID AF! :)
Great tutorial, I used flutter bloc 5.0.0 and followed your tutorial anyone facing problem passing test at this 5:30:00 For Initial state use test('initial state should be empty', () async { final initialState = await bloc.first; expect(initialState, equals(Empty())); }); -------------------- test('should emit [Error] when the input is invalid', () async { //arrange when(mockInputConverter.stringToUnsignedInteger(any)) .thenReturn(Left(InvalidInputFailure())); //assert later final expected = [ Empty(), Error(message: INVALID_INPUT_FAILURE_MESSAGE), ]; expectLater(bloc.asBroadcastStream(), emitsInOrder(expected)); //act bloc.add(GetTriviaForConcreteNumber(tNumberString)); }); ---------------------
Just had this video recommended to me by RUclips and I had to check out your channel because of your awesome thumbnails. Seriously, love the way your feed looks. Good thumbnails tell me the creator took time on the video. I’ll be following :)
For the bloc -> use add instead of dispatch if you are following along with current package versions. Also, in the current version of bloc, the bloc.state will return the current state and not the stream. So just use bloc, and the test will pass just fine. :) At about 5:19:00
On a very serious note, flutter and everything aside. Your mic and sound quality is amazing👌🏿👌🏿. There are many good courses out there one can't complete because of headache caused by the poor sound quality. Thank you!
Well there's some issues with the architecture, for example, @ResoCoder keeps sayin that these modules are "completely independent". But it's not the case. Nothing is stopping developers to write code where domain logic (or data) has dependency on presentation layer, which breaks the entire idea.
This is some next level tutorial. Thanks to you, I finally managed to understand many concepts I had a hard time wrapping my head around. Thank you so much!
Thank you so much man, this course was so interesting and especially with the modifications to perform with all the new versions of the differents packages forces us to trully understand what's going on. Can"t thank you enough for the knowledge i got through out this course 👏👏
Thanks for your valuable content. It helped me to be a better programmer. I started applying clean architecture to my office project. I have a question: ** My app has Authentication and Homepage (contains basic info of all modules in the application, like info about the number of applications to approve whereas the applications list is the separate page). How to divide the complete app into features? Should I consider the whole authentication module(Login, Signup, OTP Verification) as one feature ? Or each individual page itself as a feature? Would like to know your valuable insights about it. Thanks for your valuable time.
At 3:45:50. If anyone has issues with testing that the getLastNumberTrivia throws a CacheException, then make sure that you imported 'package:matcher/matcher.dart' but not 'package:flutter/material.dart'.......
the new version of equatable 1.0.2 change the code like this, and will it be ok when we do not use meta in code: 36:43 class NumberTrivia extends Equatable{ final String text; final int number; NumberTrivia(this.text, this.number); @override List get props => [text, number]; /* equatable version 0.4.0 NumberTrivia({ @required this.text, @required this.number, }) : super([text, number]); */ }
Im restarting my app again coz of my spaghetti code but for some reason i am so excited to do coz i was so worried about the crash reports i was gonna get ... TDD actually grows on you and men! it sticks
This can be one of the best thing ever created in the flutter world. Since the day one of Android development I was looking for something like this. And with flutter this architecture seems to be perfect, scalable, colloborative. After this course entire flutter app can be planned using UML and Mind Map, only thing remain to do is coding which later becomes really easy. It will be highly appreciated if you can make an note app starting from UML, TDD + Architecture.
video suggestion: showing how to share data between blocs using clean architecture. Best explained by example: You have an app in which the user can save e.g. recipes. In this app, you can navigate to different routes, and also edit recipes. If the user does so, the recipe data has to update on every opened screen on the navigation stack. How can this be archieved by Clean Architecture (with Bloc)? I know that one way to fo this is to pass blocs to other blocs in the constructor and listen for changes. But that doesn't seem nice.. I feel like it would be best to implement it on other layers. Thanks for your awesome work!
Thanks for the suggestion, I've just added it to my list. However, passing BLoCs into constructors is what I'm doing in apps I build for clients too and it seems to be working fine. I'm not sure what else we can do while keeping the app "non-overengineered".
@@ResoCoder I thought about getting the data as Streams out of the repository, so that the Blocs listen to changes and don't have to listen for actions in other blocs, which may cause changes. Like the first answer of phillywiggins suggests: www.reddit.com/r/FlutterDev/comments/asgggp/recommended_way_to_share_data_between_blocs/ But yeah it would cause more code and may be overengeneered then.. Thanks for putting this topic on your list anyways! :D
Omg you are a godsent, this series was super helpful, learned a lot. But let's turn to the real questions, what font and theme were you using in the videos ?
04:17:00 Just wanna know that should we test the parsing error for JSON? that makes It throw an unexpected exception, and also the previous part, we used `on ServerException` instead of `catch(e`), that made the repository break Either? Is this expected? Will you guys handle these cases in production?
1. TypeMatcher is deprecated use isInstanceOf rather for the test in number_trivia_local_data_source_test to pass. 2.Add this to your manifest file to allow unsecured HTTP connection as the API has no https provision Thanks for the awesome tutorial
Great content, but I think there is a mistake. In an "Onion" architecture, the domain is at the center. That means that you should not use external dependencies in your domain because it makes it dependant on something out of your control. As far as I understand this kind of architecture, the domain should be pure. Btw, this is by far the most professional content on flutter that I have found.
@Reso Coder 1:52:13 what if backend developer screws the JSON. like number will be received as null or "1"? TDD is scary. Fun until you receive weird JSON changes overnight. Also, when new keys are added to the JSON for displaying in the UI, we will still have to touch multiple layers to make it compatible right?
Hey, I'm really glad that you made these course. And, Im really enjoying learning here. However, I'm having some issues with the website though. Whenever I try to load more content, the page keeps loading. On the network tab, I seem to get the 403 error for some reason.
I have a very crucial question, say for example, I have many features I want to implement in my app, namely, authentication feature, data fetching using REST, using datas like Maps, and many other device specific functions, do i have to create features like this for all of them as regards clean architecture or I can mix them??.. I am confused
Is better, this arquitecture is for large proyects, imagine having 40 screens and 200 widgets in two folders and the code keep growing, just whit folders the code is a mess whit clean arquitecture you now the modules of your proyects and it's more organized
Great video @ResoCoder Suppose there is some variable like bool , string or any variable that can change UI like isSaved Something like that so if we need to handle them how we can Like in Getx we can declare in controller file but in this structure how we can manage As u said in bloc there will be only less logic like calling apiRepo/use case so can you explain that one? It will be great. Also more question on any sdk implementation like firebase services or suppose we are using any ChatSdk so how do we manage that in clean architecture
Can you explain how to use when we have multiple feature like login, signup, setting? And Whether we need to make the user entity in core folder. Looking for reply or video about it.
Number trivia, you are Talking about code design and abstraction, and at the same time you are bound to ints. What if I would like to change api to return doubles, or number trivia could return for example pi or Euler number info? Maybe it does?
H i reso, it owuld be nice if you would create a short and straight to the point video remake about this using latest Flutter, you know using null safety. If that happens you can save everyone who are new here xD
Thank you kind sir. I'm a relative newb to programming. But I've made a few basic apps and just finished one fully working one for a client. They were all spaghetti without any formal architectures. So thank you very much for this, even though I will have to look up a lot of terminologies you may use. A few questions if I may: 1. What theme are you using for your vs code? 2. Is there a way to make vs code Debug Console color coded so I can read them much more easily? 3. How do you do that auto import classes thingy when you code? Is that an extension or a shortcut? Thanks!
Timestamps:
0:01:41 [01] Explanation & Project Structure
0:25:14 [02] Entities & Use Cases
1:03:45 [03] Domain Layer Refactoring
1:26:41 [04] Data Layer Overview & Models
1:56:17 [05] Contracts of Data Sources
2:22:32 [06] Repository Implementation
3:03:38 [07] Network Info
3:23:15 [08] Local Data Source
3:53:15 [09] Remote Data Source
4:24:46 [10] Bloc Scaffolding & Input Conversion
4:50:57 [11] Bloc Implementation 1/2 (and Basics of Test Driven Development)
5:26:47 [12] Bloc Implementation 2/2
5:59:15 [13] Dependency Injection
6:29:22 [14] User Interface
Whoah! You're faster than me. Thank you!
Very very useful. Thank U
@@ResoCoder By TDD it meant that test drives the design. But I am confused by the fact that in this tutorial you have not written UI test or integression tests. Just the unit tests which will drive our business logic but not UI or it's logic. It will be really useful if we get a bigger project to get more of this tutorial. Your tutorial and teaching methodology is really great. Thanks. Also, adding your references for creating this tutorial in description will also help us to get into more details.
God bless
@@shantanooh6455 I think he keeps the rest for people who subscribed his courses, and he should be.
Before watching this tutorial, I thought that I was not a professional flutter programmer, after watching it I realized that my thoughts were correct. Thanks to the author, I learned a lot of things
Hey hi, iam just begginer. I complete flutter begginer course in net ninja . Do u need any further things to take this course. Plse show me a path , I follow docs now, but I have idea of nothing I got.
33:04 for the lastest version of equatable instead of NumberTrivia({@required this.text, @required this.number})
: super([text, number]); the new way to pass the parameters is through an override of props --> NumberTrivia({@required this.text, @required this.number});
@override
List get props => [text, number]; Just something I noticed while following the tutorial
Seriously man, you're my preferred content creator about flutter. I love your way to explain things. It's always clear and without any glitch disturbing the learning curve !
Keep up the good work dude !
mine preferred content creator abot flutter as well , keep up the good work @rescoCoder
I would have paid good money for this course. Just finished the video version, now I am going to go through the written version a few times. This guy is SOLID AF! :)
Great tutorial, I used flutter bloc 5.0.0 and followed your tutorial anyone facing problem passing test at this 5:30:00
For Initial state use
test('initial state should be empty', () async {
final initialState = await bloc.first;
expect(initialState, equals(Empty()));
});
--------------------
test('should emit [Error] when the input is invalid', () async {
//arrange
when(mockInputConverter.stringToUnsignedInteger(any))
.thenReturn(Left(InvalidInputFailure()));
//assert later
final expected = [
Empty(),
Error(message: INVALID_INPUT_FAILURE_MESSAGE),
];
expectLater(bloc.asBroadcastStream(), emitsInOrder(expected));
//act
bloc.add(GetTriviaForConcreteNumber(tNumberString));
});
---------------------
Just had this video recommended to me by RUclips and I had to check out your channel because of your awesome thumbnails.
Seriously, love the way your feed looks. Good thumbnails tell me the creator took time on the video. I’ll be following :)
Thank you for noticing 🥳
For the bloc -> use add instead of dispatch if you are following along with current package versions. Also, in the current version of bloc, the bloc.state will return the current state and not the stream. So just use bloc, and the test will pass just fine. :) At about 5:19:00
man, you are the hero of 2020!
This is absolutely the best Flutter content is this whole world!!!!!!
So precious knowledge, flawlessly delivered without any charges. Amazing! Hats off to you! Watched this video twice to get the grip :)
I salute your patience for being with us for such a elastic elaboration
On a very serious note, flutter and everything aside. Your mic and sound quality is amazing👌🏿👌🏿. There are many good courses out there one can't complete because of headache caused by the poor sound quality. Thank you!
Wow, just wow! You should be a flutter GDE!
Spread the message! 😄
@@ResoCoder now
Timeline step-by-step screenshots for this course
alexkenbo.github.io/index.html
✅success run test
⛔️failed run test
This is amazing! 🤩🤯 If only I could pin multiple comments 😢
@@ResoCoder Comments for the step?
Yes, I think that would be great.
There is the ability to display any html with the image.
Are 10 dislikers kinda struggling React Native users? :D
Gosh, this is gold, as always.
Well there's some issues with the architecture, for example, @ResoCoder keeps sayin that these modules are "completely independent". But it's not the case. Nothing is stopping developers to write code where domain logic (or data) has dependency on presentation layer, which breaks the entire idea.
Bro this is so cringe
Best series on flutter in one video, for what more you could ask 😂🔥👊🏻 thanks a lot.
This is some next level tutorial. Thanks to you, I finally managed to understand many concepts I had a hard time wrapping my head around. Thank you so much!
this is 2 years old, still relevant?
Thank you completed 7 hrs course...learnt alot!
_Clean Architecture_ says it all! And for my mindset, simply can't be stressed enough. Thank you.
Thank you so much man, this course was so interesting and especially with the modifications to perform with all the new versions of the differents packages forces us to trully understand what's going on. Can"t thank you enough for the knowledge i got through out this course 👏👏
3:12:28 Thought my speaker broke or something haha
Anyway, nice tutorial! Perfect for beginning flutter-devs!
Holy smokes! I almost lost my left ear. Pardon the Premiere Pro rendering 😅
Thank you for the excellent tutorial! It's even better than most of the paid stuff on udemy... Really good work!
Done!!! This has beem one of the most important Tutorials for me!! i am going to start the next FB & DDD Tutorial. Thanks Reso!!!
You rock My dear sir, please keep us learning, and we cant thank you enough, all love from Zimbabwe.
AFRICA ARISE HonestChiefPoet iwe! You started learning flutter? Give me your watsapp number and we can learn together tho
My friend, where did you learn this? Awesome! Thank you a lot man
2:23:45 I will continue it by tomorrow
Slacker! 😂😂😂 JK
@@ResoCoder ok continue again
Gem tutorial with no ads.
Жақсы курс. Рахмет!
Next level content mate! Loved it
Very well articulated.
you have patience and skills hats off to you brother.
thanks for this awesome tutorial
it so informative that i watch it full video without any break thank u reso bro
Thanks for your valuable content. It helped me to be a better programmer. I started applying clean architecture to my office project.
I have a question:
** My app has Authentication and Homepage (contains basic info of all modules in the application, like info about the number of applications to approve whereas the applications list is the separate page). How to divide the complete app into features? Should I consider the whole authentication module(Login, Signup, OTP Verification) as one feature
? Or each individual page itself as a feature?
Would like to know your valuable insights about it.
Thanks for your valuable time.
At 3:45:50. If anyone has issues with testing that the getLastNumberTrivia throws a CacheException, then make sure that you imported 'package:matcher/matcher.dart' but not 'package:flutter/material.dart'.......
Thanks a lot for your great tutorials, it was beneficial for me in my career.
thanks for such a detailed and easy to consume content. Great work!
the new version of equatable 1.0.2 change the code like this, and will it be ok when we do not use meta in code: 36:43
class NumberTrivia extends Equatable{
final String text;
final int number;
NumberTrivia(this.text, this.number);
@override
List get props => [text, number];
/* equatable version 0.4.0
NumberTrivia({
@required this.text,
@required this.number,
}) : super([text, number]);
*/
}
Wow! Content so good no single dislike. Thanks thanks people!
457th Like was from me. Let's keep it coming people.
Just reached the 3 hour mark and this course is beating my ass 🤣 Thanks for the awesome instruction.
3:20 clicks random trivia, gets 69. Nice. XD
You have helped me immensely. Thank you for everything you do!
Im restarting my app again coz of my spaghetti code but for some reason i am so excited to do coz i was so worried about the crash reports i was gonna get ... TDD actually grows on you and men! it sticks
This can be one of the best thing ever created in the flutter world.
Since the day one of Android development I was looking for something like this. And with flutter this architecture seems to be perfect, scalable, colloborative.
After this course entire flutter app can be planned using UML and Mind Map, only thing remain to do is coding which later becomes really easy.
It will be highly appreciated if you can make an note app starting from UML, TDD + Architecture.
Sumptuously! Do not come off! Thanks for the job.
video suggestion: showing how to share data between blocs using clean architecture.
Best explained by example: You have an app in which the user can save e.g. recipes. In this app, you can navigate to different routes, and also edit recipes. If the user does so, the recipe data has to update on every opened screen on the navigation stack. How can this be archieved by Clean Architecture (with Bloc)?
I know that one way to fo this is to pass blocs to other blocs in the constructor and listen for changes. But that doesn't seem nice.. I feel like it would be best to implement it on other layers.
Thanks for your awesome work!
Thanks for the suggestion, I've just added it to my list. However, passing BLoCs into constructors is what I'm doing in apps I build for clients too and it seems to be working fine. I'm not sure what else we can do while keeping the app "non-overengineered".
@@ResoCoder I thought about getting the data as Streams out of the repository, so that the Blocs listen to changes and don't have to listen for actions in other blocs, which may cause changes. Like the first answer of phillywiggins suggests: www.reddit.com/r/FlutterDev/comments/asgggp/recommended_way_to_share_data_between_blocs/ But yeah it would cause more code and may be overengeneered then.. Thanks for putting this topic on your list anyways! :D
Thanks so much Reso
Your tutorial is very useful to me
Omg you are a godsent, this series was super helpful, learned a lot. But let's turn to the real questions, what font and theme were you using in the videos ?
This is gold.
Thanks, sincerely.
No. This is Diamond.
Excellent work, amazing as well as Flutter. Your videos and content on Flutter are very helpful and useful.
What a master class! Thanks a lot for sharing this. You are amazing
Thanks for making this tutorial.
This is amazing and really appreciated. Thank you for making these!!
04:17:00 Just wanna know that should we test the parsing error for JSON? that makes It throw an unexpected exception, and also the previous part, we used `on ServerException` instead of `catch(e`), that made the repository break Either? Is this expected? Will you guys handle these cases in production?
always enjoy your videos. please enable CC caption for this video, thanks in advance
I am in love !! Thank you for the good tutorial
Thank you SO much, Really appreciate your effort.
u r my hero ...respect from INDIA sallluuuuuuuuuuuuuuuute!
1. TypeMatcher is deprecated use isInstanceOf rather for the test in number_trivia_local_data_source_test to pass.
2.Add this to your manifest file to allow unsecured HTTP connection as the API has no https provision
Thanks for the awesome tutorial
Damn, man!! I'm waiting for more more more videos like this one from you
This is super useful! Really appreciate your effort.
Muuuuuuuuuuuuuuuuuch love for this my friend.
I just found about you.... And I thank God for it!!!!!!
Great content, but I think there is a mistake. In an "Onion" architecture, the domain is at the center. That means that you should not use external dependencies in your domain because it makes it dependant on something out of your control. As far as I understand this kind of architecture, the domain should be pure.
Btw, this is by far the most professional content on flutter that I have found.
He explicitly proposes “Reso Coder's Flutter Clean Architecture Proposal” for implementing the Onion.
He is using the extension "Material Icon Theme" by Philipp Kief (with some tweaks to it in the settings.json) if anyone else but me wondered :)
@Reso Coder 1:52:13 what if backend developer screws the JSON. like number will be received as null or "1"? TDD is scary. Fun until you receive weird JSON changes overnight. Also, when new keys are added to the JSON for displaying in the UI, we will still have to touch multiple layers to make it compatible right?
Hey, I'm really glad that you made these course. And, Im really enjoying learning here. However, I'm having some issues with the website though. Whenever I try to load more content, the page keeps loading. On the network tab, I seem to get the 403 error for some reason.
Amazing job, dude! Thank you very much!
Thank you SO much man! Really appreciate your effort.
Wow the full tuto is 7hours long oO ! With 13 videos we don’t know haha.
Very thanks for this content ! You rock !
I was quite shocked as well 😄
I have a very crucial question, say for example, I have many features I want to implement in my app, namely, authentication feature, data fetching using REST, using datas like Maps, and many other device specific functions, do i have to create features like this for all of them as regards clean architecture or I can mix them??.. I am confused
Is it updated for today? For example, does it take into consideration the 'provider' package?
still very useful tutorial ever
Full Course was awesome! Are you going to add UI tests too?
For anyone looking to add the aaa snippet:
Visual Studio Code > Code > Preferences > User Snippets and paste this in.
"Test AAA": {
"prefix": "aaa",
"body": [
"test(",
" 'should $0',",
" () async {",
" // arrange",
" ",
" // act",
" ",
" // assert",
" ",
" },",
");"
],
"description": "Test with arrange, act and assert"
}
pure gold, thank you
I love this kind of long videos
How to handle the stream like firestore stream in the streambuilder widget in the UI. Anybody can give an exampleof the usecase, data source?
A better idea than using the NoParams class for the use cases is to use the Unit type from dartz, which is a functional programming concept anyway.
how also do we implement clean architecture when we want to create an app that has so many screens if only this one screen has so much code
Is better, this arquitecture is for large proyects, imagine having 40 screens and 200 widgets in two folders and the code keep growing, just whit folders the code is a mess whit clean arquitecture you now the modules of your proyects and it's more organized
Correct
Great video @ResoCoder
Suppose there is some variable like bool , string or any variable that can change UI like isSaved Something like that so if we need to handle them how we can
Like in Getx we can declare in controller file but in this structure how we can manage
As u said in bloc there will be only less logic like calling apiRepo/use case so can you explain that one?
It will be great.
Also more question on any sdk implementation like firebase services or suppose we are using any ChatSdk so how do we manage that in clean architecture
Where can I find your code snippets like aaatest, etc
Can you explain how to use when we have multiple feature like login, signup, setting? And Whether we need to make the user entity in core folder. Looking for reply or video about it.
@Reso , please upload for the Firebase sign In methods with the same architecture. it will be helpful in understanding repos implementation better.
Number trivia, you are Talking about code design and abstraction, and at the same time you are bound to ints. What if I would like to change api to return doubles, or number trivia could return for example pi or Euler number info? Maybe it does?
I have a question? Can I use the Clean Architecture with GetX?
Great tutorial
Fantasic Video Job Good Man
Thanks brother, and we expect updates
I will be grateful to you if you put the subtitle. Thanks
Why did you use a Failure class instead of the try/catch pattern? Try/catch is what Clean Code recommends. Curious on the motivation for that
How can you use such simple names like "Error" for the BLoC states? Wouldn't you get a naming collision as soon as you create your second bloc?
love this tutorial, thanks
Why do we have to use Params and NoParams for the usecases?
H i reso, it owuld be nice if you would create a short and straight to the point video remake about this using latest Flutter, you know using null safety. If that happens you can save everyone who are new here xD
Please make tutorial about flutter and firebase analytics, crashlytics, and performance together 😁
👨💻👷
@@ResoCoder I watch every video you upload including advice vlogs :)
Im a solo flutter dev in a startup company and you save me a lot 😁 thanks
Thank you kind sir. I'm a relative newb to programming. But I've made a few basic apps and just finished one fully working one for a client. They were all spaghetti without any formal architectures. So thank you very much for this, even though I will have to look up a lot of terminologies you may use. A few questions if I may:
1. What theme are you using for your vs code?
2. Is there a way to make vs code Debug Console color coded so I can read them much more easily?
3. How do you do that auto import classes thingy when you code? Is that an extension or a shortcut?
Thanks!
Wouldnt it be better to make failure dependend on exception, and then return dependant of it...? No copy paste?
Amazing! 😍
Awesome! Thank you a lot man.
So if i have multiple features in my app, i should have injection_container for each feature, or for all features??
This is Gold