Rivaan you have a gift for teaching! I rarely hang in this long on a course like this but I'm 4 hours in and still going! The concept of the domain and the data layer sharing a repository through abstract class interfaces finally clicked for me when watching this. Many thanks!
Hello Rivaan, thank you very much. Yeaah, I've completed 7 hours. It took me a few days to go through the whole video. Thank you for the simple explanation of this complex concept
Hey Rivaan, I just wanted to drop in and say a massive thank you for your amazing Flutter and BLoC tutorial. It was incredibly well-structured and insightful, making the learning process so much smoother and enjoyable. Your dedication to sharing knowledge is truly appreciated! Also, I have a small request. Could you consider creating a tutorial on building a food delivery app using Google Maps with live ride-sharing features in Flutter and BLoC? I believe it would be a fantastic addition to your tutorials, and many of us are eager to learn how to integrate these advanced functionalities. Thanks again for your great work! 🎉
Rivaan, you are the only person who could make me understand this. I tried many videos before. None made sense to me. I am so grateful to you. Can't thank you enough.
I know that most dart developers will use the "imp" as a keyword for the implementation, but coming from a C# background, I prefer using the "I" for the interface and the normal name for the implementation. I found it very helpful while following along with this course. So, the IAuthRemoteDataSources will be for the interface and the AuthRemoteDataSource will be for the implementation, as an example
7:04:58. Finally done! I hope to add some awesome features to this app in the future. Of course, I will do this at another time, and when I do, I will share my repo here for everyone. thanks Rivaan. ❤✅
Excellent Rivaan I have just completed you bloc tutorial and you have so good in your explanation that I can't even describe the best part of your explanation is that you explain even basic things of dart ThankYOu so much for these tutorials
Even though it's a bit challenging for me to get my head around this, after your such an amazing explanation, I should just practice it more to get a knack of it! but, man, you're truly done a great job in explaining every bit soo clearly! thank you soo much for this amazing tutorial bro! For real! Thanks a bunch! 💗😊
@@RivaanRanawat Thank you very much. Understood everything. Is there any possibility of a video on Optimisation and Performance like the dos and don'ts. It would be a great help.
I am an hour into the project and I cannot appreciate how well you have explained all the little things in the UI. Hoping the entire project goes like this!
That's fantastic! Rivaan bhai's video on Clean Architecture seems to be really insightful and practical. It's great and I'm not just watching video but also actively practicing by creating Flutter projects. It's through hands-on experience like this that you can truly understand and apply concepts to write production-level code. Keep up the good work!
Thank you so much for the guidance! I was able to understand the use of Clean Architecture in Flutter and all the related packages. You made an amazing tutorial! Keep it up! 💪🧠🧑💻
36:20 Preferably you'll want the entire page to be scrollable because the devices that your app will be used on won't have the same dimensions has the one you are using in development. Bigger screen sizes would be okay but smaller ones will result in an overflow err but if it's scrollable then the user has the job 👍🏾
Thank you for the wonderful tutorial bro it is so helpful for me and my team, thanks again i have not finished the tutorial but it will be good so thank you in advance
Selute to your hard work in love tutorial please keep making the content on flutter and we will also love to see a course in jetpack compose ❤ keep it up
Rivaan this is excellent work my friend. Any chance for the next tutorial we can get a desktop and mobile app? would be interesting to see how you do the split in the code between the two with your clean code approach.
00:01 Building a blog app with clean architecture in Flutter 02:09 Understanding the overall flow of the app 06:28 Clean architecture ensures efficient data flow and separation of concerns. 08:41 Implementing use cases, entity, repository, and data sources in clean architecture 13:08 Repository Interface in Domain Layer 15:22 Applying clean architecture principles 19:33 Utilize Flutter Widget Snippets for quicker boilerplate code writing. 21:28 Setting up central theme for entire application. 25:25 Creating a reusable component for the signup page 27:30 Using text form field for form validation 31:27 Adjusting Border radius for text fields 33:26 Creating reusable function for customizable color in Flutter 37:21 Creating a custom styled button 39:25 Implementing gradient in Flutter ElevatedButton 43:33 Implementing centralized control of colors in Flutter 45:41 Implementing 'Don't have an account' text and style in Flutter 49:36 Setting up form validation for the signup page 51:28 Implementing field validation using a custom validator function 55:35 Implement obscure text for password field. 57:42 Customize text fields in Flutter 1:01:52 Implementing navigation in Flutter for moving between screens. 1:03:54 Creating custom routes and navigation in Flutter 1:08:04 Implementing repository interface in domain layer for decoupling in Clean Architecture 1:10:07 Abstract classes provide base for subclasses, interfaces define method implementations 1:14:15 Setting up user model and sign up function with required parameters. 1:16:20 Signing in and setting up a project with Supabase 1:20:29 Initializing Superbase database and running the app on iOS and Android. 1:22:29 Creating a remote data source interface 1:26:43 Using dependency injection for Superbase client to avoid creating a dependency in the class and for testing purposes 1:28:42 Implementing user signup using Superbase 1:32:46 Creating a custom Server Exception for detailed error handling. 1:34:52 Implementing repository in the data layer 1:39:07 Implementation of sign up with email password 1:41:12 Creating use case interface in core folder for structured use cases 1:45:24 Creating a class to manage dynamic parameters 1:47:33 Creating a clean use case 1:51:48 Creating classes for loading, success, and failure states, and defining the user signup event in Bloc. 1:54:00 Initializing private variables using 'require' and 'initializer list' 1:58:18 Implementing failure and success states in Bloc 2:00:31 Wrap My App with Multi-Block Provider 2:04:52 Validating form and triggering sign up event in Bloc 2:07:02 Implementing clean architecture with repositories and data sources 2:11:15 GetIt is crucial for managing dependencies in Flutter applications. 2:13:25 Setting up service locator for dependency injection 2:17:45 Registering Dependencies with GetIt for Flutter Clean Architecture 2:19:48 Registering Factories and Blocks 2:24:01 Setting up automatic data storage in Superbase database using triggers 2:26:05 Implement row-level security and define table columns with Supabase 2:30:12 Implementing row-level security policies on profiles table 2:32:14 Setting up triggers and storage in Supabase 2:36:18 Creating and verifying new user in database 2:38:21 Understanding the concept of foreign keys connecting tables. 2:42:20 Conversion of data source response to user model for Flutter Clean Architecture 2:44:26 Creating a factory user model fromJson function 2:48:45 Use user entity in domain layer instead of string for user sign up 2:50:50 Using Block Builder and Listener in Flutter for State Management 2:55:08 Completing the login feature 2:57:03 Implementation of sign in with email and password 3:01:17 Handling exceptions using clean architecture 3:03:29 Implementing user login use case with Bloc 3:08:05 Implementing login functionality in the Flutter app 3:10:16 Implementing service locator for easier management 3:14:30 Review of Clean Architecture structure and implementation in Flutter app development. 3:16:37 Implementing clean architecture with separate layers. 3:20:59 Following SOLID Principles 3:23:15 Dependency Inversion Rule in Clean Architecture 3:27:26 Fetch user data from the database using current user session. 3:29:27 Using Supabase client to interact directly with the database for querying specific data. 3:33:31 Understanding why we get a list of map string, dynamic 3:35:43 Handling null user scenarios in remote data calls effectively 3:40:09 Creating a class to check user login status 3:42:18 Implementing new use case for current user and testing functionality. 3:46:27 Implementing app-wide user Cubit for user data retrieval 3:48:33 Creating common Cubits in Flutter Clean Architecture 3:52:47 Setting up app user Cubit for user state management 3:54:56 Updating user state in Bloc with Cubit 3:59:01 Implementing user authentication and showing login or homepage based on user login status 4:01:02 Implement catch-all loader for automatic loading indicator 4:05:04 Creating a blog page with navigation and form to upload blogs 4:07:03 Creating a new page and stateful widget for adding a new blog entry. 4:11:11 Styling and alignment of UI elements 4:13:16 Adjusting size, border, and shape of container 4:17:22 Customizing chip theme and appearance 4:19:31 Creating a custom text field widget for multiline input in Flutter 4:23:27 Fixing render flow error by wrapping the widget with SingleChildScrollView and implementing selection logic for chips 4:25:29 Implementing dynamic chip selection and color display based on user actions. 4:29:52 Setting up app permissions and creating utility functions for image handling 4:31:56 Handling image picking and displaying 4:36:04 Display image based on user selection 4:38:10 Implementing if condition for image selection 4:42:09 Storing user ID instead of user name for flexibility and database relations. 4:44:16 Setting up table for blogs and enabling row level security. 4:48:25 Creating blog entity and model 4:50:43 Creating a Blog model for easier data handling. 4:55:08 Using datetime for updated at value and converting string to datetime 4:57:22 Implementing JSON serialization to fetch and process blog data. 5:01:29 Uploading and retrieving images using Superbase storage. 5:03:38 Creating blog repository interface in the domain layer 5:07:58 Implementing remote data source for uploading images 5:10:07 Updating blog model with image URL 5:14:33 Creating a new blog block in the presentation layer 5:16:43 Implementing blog upload functionality with Bloc in Flutter 5:21:03 Registering data source, repository, use case, and bloc using service locator 5:23:15 Adding form validation logic to the Blog Editor part. 5:27:29 Implementing complex logic for uploading a blog post 5:29:39 Implementing failure and success states in Bloc 5:33:59 Implement get all blogs function in data source and display on homepage. 5:35:58 Utilizing foreign key to retrieve user information efficiently 5:40:04 Avoid storing unnecessary fields in the model 5:42:03 Accessing data from profiles table in Flutter using Clean Architecture 5:46:24 Creating custom event handler in Flutter Clean Architecture 5:48:35 Bloc success event needs to be emitted differently to handle display and upload success. 5:52:56 Implementing list view builder for displaying blogs. 5:55:03 Creating a blog display card 5:59:09 Customizing Container and Layout in Flutter 6:01:10 Adjust layout and styling for blog topics display 6:05:11 Creating a function to calculate reading time based on word count. 6:07:20 Calculating reading time based on word count and average reading speed. 6:11:31 Implementing dynamic color scheme based on blog position. 6:13:38 Adjusted margin for spacing between blocks 6:17:50 Pass blog from route parameters and style text. 6:20:07 Formatting date and styling text in Flutter 6:24:25 Formatting the date and time in a specific pattern 6:26:35 Implementing internet connection and local storage logic 6:30:47 Implementing network-related tasks in the repository 6:32:52 Implementing error handling for no internet connection scenario. 6:36:48 Using Hive for local storage and caching 6:38:50 Integrating Hive as a local database in Flutter Clean Architecture 6:43:03 Manage local data storage efficiently in Flutter using Hive 6:45:13 Uploading local blogs and handling data storage and retrieval 6:49:29 Registering Hive box and data source in Flutter app. 6:51:36 Implementing local data source and caching using Hive database 6:55:47 Handling exceptions in Flutter Clean Architecture 6:57:58 Refactoring code for better organization 7:02:19 Centralized control through constants for easy updating 7:04:26 Clean architecture is essential for app development
Oh maybe. In auth_remote_data_sources.dart we add ".copyWith" to the line "return UserModel.fromJson(response.user!.toJson());" But do we change anything on that line?
So, would it be two lines of code changing? return UserModel.fromJson(response.user!.toJson()).copyWith(); return UserModel.fromJson(response.user!.toJson()).copyWith(); Like this?
I have implemented that Chip with (Filter Chip) at 4h :26 min .. In my version, I got rid of any stateful behaviour, No need mapping + gesture detector as well. It is built in notifier and in future, I can do HookWidget on this page. (No need set state call as well) .
Hey Rivaan thank you giving us this great tutorial. In past couple of weeks I learned dart and flutter from your 20 hour video. In this video I 'm facing a problem when I try to upload a blog this app in my virtual app gets hang and I have to restart the app and blog dosen't go back to the supabase
I have a doubt, Rivaan! How should I implement the logout? I mean, what should be the flow? Should I call logout from the blog screen? And since logout is ideally related to authentication, I cannot use the authentication repository here due to the 'S' in SOLID principles. Additionally, I cannot create a global use case, as high-level modules cannot depend on low-level authentication modules. What should be the flow?
Tks alot, this is actually a really good tutorial and help write actually clean code. However, in the process of using it I feel like it take too much time for just one query. So I think you can make a tutorial on a simplified version of this clean architecture.
thats the neat part about clean architecture. in enterprise level apps you need to maintain a lot of code and clean architecture does that for you. dont worry it has a steep learning curve but it is worth it
Finally a much industry video. Thanks much Rivaan. You save the day. In case with don't want to use BaaS but API will it have to affect the whole code?
at 5:41:53 can't we just do a null check in fromJson method, i think that's better than writing the copyWith method inside the remote call, and thanks for the amazing tutorial.
Thanks for your sharing this tutorial as it helps me a lot to understand the clean architecture in the practice. May I ask your help to explain: - when the session user will be timeout so that user will go to the sign in page again - where we should put the button for the user to log out on this application
In my opinion, he should have used the onAuthStageChange provided by Supabase to handle the session expired, and the logout i just put it on the user page (you can make one your own)
Rivaan, with all due respect to `fpdart` package, why would you use it since Dart has Records? My example of an API method... Future getMyResponse() Then in the code, if it returns properly, I return an instance of MyResponse and I return null for the `error`. If it returns an error, I return null for the response and some error. Does this make sense? It's pretty clean and we utilize new Dart feature without using additional packages.
Hi. If I have to implement a monthly or yearly subscription model for my mobile application. Then is it mandatory to use In-App-Purchases ? I mean we cannot use an external payment gateway. How Netflix is redirecting users to its website to avoid 30% fees. Please talk about this.
Thank you very much for making such videos I added a in blog feature to this app to fetch the current user blogs in a separate screen the issue I face is it overrides the the data of each other when I dispatch the user blogs event it hides the data of the blog screen and vise versa
Thank you very much for the material! Tell me, please, how to use AppAuthCubit in GoRouter? Need to bind the authorization status check to the ShellRoute, do I'm understand correctly?
@RivaanRanawat I have a question: I want to implement Sign Out functionality - I could add that in 'auth layer' (which can internally call app user cubit, passing user as null, leading route change to SignInPage).....but what about the button I have to add it on Blog Feature's Page's AppBar if you get it..... This would break clean architecture.... So Ideally I should move signout functionlity to Core...right ?
Thank you very much for the course. There is one thing I'm struggling with and I was hoping you could help me, if your don't mine. When using a feature first approach, what happens when you have a single local SQL database for all your app? I understand that the creation of the database itself probably has to go to the core or shared folder. But what happens if you have 2 features and one of them has a model that has a relationship with a model of the other feature? I'm talking about foreign keys, of course. Can one feature be used inside another feature? Or is it better to move all the models to the core or shared folder alongside the database creation?
How are you not a multi-millionaire when you're capable of building these apps front to back? Great work. Thank you so much.
Plot-twist- he is..
Rivaan you have a gift for teaching! I rarely hang in this long on a course like this but I'm 4 hours in and still going!
The concept of the domain and the data layer sharing a repository through abstract class interfaces finally clicked for me when watching this. Many thanks!
I made it through the whole thing! Time to build!
Congrats how long did it take generally
I'm just about to start@@jeromestsauver
I was annoyed that you weren't posting any new videos, but now that you have, I'm glad.
Your explanation is really simple and understandable. One of the best training videos I've ever watched. Greetings from Turkey.
Thanks so much, glad it helped!
Hello Rivaan, thank you very much.
Yeaah, I've completed 7 hours. It took me a few days to go through the whole video. Thank you for the simple explanation of this complex concept
Hey Rivaan, I just wanted to drop in and say a massive thank you for your amazing Flutter and BLoC tutorial. It was incredibly well-structured and insightful, making the learning process so much smoother and enjoyable. Your dedication to sharing knowledge is truly appreciated!
Also, I have a small request. Could you consider creating a tutorial on building a food delivery app using Google Maps with live ride-sharing features in Flutter and BLoC? I believe it would be a fantastic addition to your tutorials, and many of us are eager to learn how to integrate these advanced functionalities. Thanks again for your great work! 🎉
I do have plans for building a food delivery app but I'm not sure if it's going to be with Bloc. Considering Riverpod (with code gen) for it
@RivaanRanawat thank you for your reply. It's great to know that.
Looking forward to that Sir 🙌
Can't believe this is free. Even a paid course wouldn’t be this good
Hey Rivaan a big update from my side. Received an offer for flutter developer. I've learnt a lot from your videos. Thanks man.
Big Congratulations Adnan🎉🎉
I know, only Rivaan can make me understand things like these. ♥
Thanks Adnan, let me know if you're able to understand!
i like your explanation, detail oriented and not boring anymore. thank you for providing this quality free tutorial
Glad you liked it!
Thank you very much Rivaan for sharing this mater tutorial on using flutter bloc, and also explaining the clean architecture.
The type of tutorial i have been looking for about clean architecture in Flutter. Thank you.
Rivaan, you are the only person who could make me understand this. I tried many videos before. None made sense to me. I am so grateful to you. Can't thank you enough.
I know that most dart developers will use the "imp" as a keyword for the implementation, but coming from a C# background, I prefer using the "I" for the interface and the normal name for the implementation. I found it very helpful while following along with this course. So, the IAuthRemoteDataSources will be for the interface and the AuthRemoteDataSource will be for the implementation, as an example
7:04:58. Finally done! I hope to add some awesome features to this app in the future. Of course, I will do this at another time, and when I do, I will share my repo here for everyone.
thanks Rivaan. ❤✅
Excellent Rivaan I have just completed you bloc tutorial and you have so good in your explanation that I can't even describe the best part of your explanation is that you explain even basic things of dart ThankYOu so much for these tutorials
Even though it's a bit challenging for me to get my head around this, after your such an amazing explanation, I should just practice it more to get a knack of it! but, man, you're truly done a great job in explaining every bit soo clearly! thank you soo much for this amazing tutorial bro! For real! Thanks a bunch! 💗😊
You are doing so much for the Flutter community brother, Thank you dil se ❤️
Thank you Kartik!
Man you really are amazing I was waiting for this video but I haven't watched it yet😅😅😅
I know your flutter tutorials are all awesome.
Thanks! Let me know how it goes ;)
man I had been looking for a good Clean Architecture video for 3 days now and see what I got now. Man you have posted it at a great time.
Same with me!
also same with me
Lemme know if you guys were able to understand the content!
@@RivaanRanawat Thank you very much. Understood everything. Is there any possibility of a video on Optimisation and Performance like the dos and don'ts. It would be a great help.
An excellent tutorial for clean architecture for flutter I have ever found in youtube ❤❤❤. Now completed it.
I am an hour into the project and I cannot appreciate how well you have explained all the little things in the UI. Hoping the entire project goes like this!
how does it went do learn anything
Thank you very much for this content. I've learned a lot of good things. Hugs from Brazil
Great tutorial! I love tutorials that go straight to code and code quickly! Thanks.
Thank you!!
Love to see you Rivaan... Love From Bangaldesh.
非常感谢 Rivaan 分享这个关于使用 flutter bloc 的教程,并解释了干净的架构。
Amazing content Riwaan!❤ Your teaching style and your voice is really unique!!
Only that can motivate you to watch until the end Rivaan's Tutorial 😄
Thank you so much guys!
Thank you very much Rivaan. So much learned in only 7 hours.
That's fantastic! Rivaan bhai's video on Clean Architecture seems to be really insightful and practical. It's great and I'm not just watching video but also actively practicing by creating Flutter projects. It's through hands-on experience like this that you can truly understand and apply concepts to write production-level code. Keep up the good work!
Thank you so much for the guidance! I was able to understand the use of Clean Architecture in Flutter and all the related packages. You made an amazing tutorial! Keep it up! 💪🧠🧑💻
36:20 Preferably you'll want the entire page to be scrollable because the devices that your app will be used on won't have the same dimensions has the one you are using in development. Bigger screen sizes would be okay but smaller ones will result in an overflow err but if it's scrollable then the user has the job 👍🏾
After a long time. Finally a flutter video, thank you brother.
The previous video was a flutter vid too!
I Genuinely Appreciate this video!
Thank you very much
Thanks for your constant support!
This has so much great content, thank you so much!!!
Thank You, Your channel is helping me a lot !!
I learned a lot, thank you. It was great.
How much patience do you have bro? wow you have explained it so clear and so many times through out the course hats off amazed
Thank you so much Rivaan brother ❤❤
Thanks for your constant support Nikhil!
Thank you for the wonderful tutorial bro it is so helpful for me and my team, thanks again
i have not finished the tutorial but it will be good so thank you in advance
I am always eagerly waiting for your videos. Keep sharing your knowledge with us !!
Thanks Rahul!
U just got a new subscriber, but i need to learn basic flutter first. see you next week!!
Selute to your hard work in love tutorial please keep making the content on flutter and we will also love to see a course in jetpack compose ❤ keep it up
Would love to explore Flutter and beyond
Eagerly waiting for this type of video...
Thank you so much for this content.
My pleasure!
Rivaan this is excellent work my friend. Any chance for the next tutorial we can get a desktop and mobile app? would be interesting to see how you do the split in the code between the two with your clean code approach.
Bro Dropped This Banger and Vanished
Rivaan is back with his new master piece 😇
Thanks Fahad!
Thanks you very much Sir Rivaaan, You are a Great Teacher.
Thanks again Kevin!
00:01 Building a blog app with clean architecture in Flutter
02:09 Understanding the overall flow of the app
06:28 Clean architecture ensures efficient data flow and separation of concerns.
08:41 Implementing use cases, entity, repository, and data sources in clean architecture
13:08 Repository Interface in Domain Layer
15:22 Applying clean architecture principles
19:33 Utilize Flutter Widget Snippets for quicker boilerplate code writing.
21:28 Setting up central theme for entire application.
25:25 Creating a reusable component for the signup page
27:30 Using text form field for form validation
31:27 Adjusting Border radius for text fields
33:26 Creating reusable function for customizable color in Flutter
37:21 Creating a custom styled button
39:25 Implementing gradient in Flutter ElevatedButton
43:33 Implementing centralized control of colors in Flutter
45:41 Implementing 'Don't have an account' text and style in Flutter
49:36 Setting up form validation for the signup page
51:28 Implementing field validation using a custom validator function
55:35 Implement obscure text for password field.
57:42 Customize text fields in Flutter
1:01:52 Implementing navigation in Flutter for moving between screens.
1:03:54 Creating custom routes and navigation in Flutter
1:08:04 Implementing repository interface in domain layer for decoupling in Clean Architecture
1:10:07 Abstract classes provide base for subclasses, interfaces define method implementations
1:14:15 Setting up user model and sign up function with required parameters.
1:16:20 Signing in and setting up a project with Supabase
1:20:29 Initializing Superbase database and running the app on iOS and Android.
1:22:29 Creating a remote data source interface
1:26:43 Using dependency injection for Superbase client to avoid creating a dependency in the class and for testing purposes
1:28:42 Implementing user signup using Superbase
1:32:46 Creating a custom Server Exception for detailed error handling.
1:34:52 Implementing repository in the data layer
1:39:07 Implementation of sign up with email password
1:41:12 Creating use case interface in core folder for structured use cases
1:45:24 Creating a class to manage dynamic parameters
1:47:33 Creating a clean use case
1:51:48 Creating classes for loading, success, and failure states, and defining the user signup event in Bloc.
1:54:00 Initializing private variables using 'require' and 'initializer list'
1:58:18 Implementing failure and success states in Bloc
2:00:31 Wrap My App with Multi-Block Provider
2:04:52 Validating form and triggering sign up event in Bloc
2:07:02 Implementing clean architecture with repositories and data sources
2:11:15 GetIt is crucial for managing dependencies in Flutter applications.
2:13:25 Setting up service locator for dependency injection
2:17:45 Registering Dependencies with GetIt for Flutter Clean Architecture
2:19:48 Registering Factories and Blocks
2:24:01 Setting up automatic data storage in Superbase database using triggers
2:26:05 Implement row-level security and define table columns with Supabase
2:30:12 Implementing row-level security policies on profiles table
2:32:14 Setting up triggers and storage in Supabase
2:36:18 Creating and verifying new user in database
2:38:21 Understanding the concept of foreign keys connecting tables.
2:42:20 Conversion of data source response to user model for Flutter Clean Architecture
2:44:26 Creating a factory user model fromJson function
2:48:45 Use user entity in domain layer instead of string for user sign up
2:50:50 Using Block Builder and Listener in Flutter for State Management
2:55:08 Completing the login feature
2:57:03 Implementation of sign in with email and password
3:01:17 Handling exceptions using clean architecture
3:03:29 Implementing user login use case with Bloc
3:08:05 Implementing login functionality in the Flutter app
3:10:16 Implementing service locator for easier management
3:14:30 Review of Clean Architecture structure and implementation in Flutter app development.
3:16:37 Implementing clean architecture with separate layers.
3:20:59 Following SOLID Principles
3:23:15 Dependency Inversion Rule in Clean Architecture
3:27:26 Fetch user data from the database using current user session.
3:29:27 Using Supabase client to interact directly with the database for querying specific data.
3:33:31 Understanding why we get a list of map string, dynamic
3:35:43 Handling null user scenarios in remote data calls effectively
3:40:09 Creating a class to check user login status
3:42:18 Implementing new use case for current user and testing functionality.
3:46:27 Implementing app-wide user Cubit for user data retrieval
3:48:33 Creating common Cubits in Flutter Clean Architecture
3:52:47 Setting up app user Cubit for user state management
3:54:56 Updating user state in Bloc with Cubit
3:59:01 Implementing user authentication and showing login or homepage based on user login status
4:01:02 Implement catch-all loader for automatic loading indicator
4:05:04 Creating a blog page with navigation and form to upload blogs
4:07:03 Creating a new page and stateful widget for adding a new blog entry.
4:11:11 Styling and alignment of UI elements
4:13:16 Adjusting size, border, and shape of container
4:17:22 Customizing chip theme and appearance
4:19:31 Creating a custom text field widget for multiline input in Flutter
4:23:27 Fixing render flow error by wrapping the widget with SingleChildScrollView and implementing selection logic for chips
4:25:29 Implementing dynamic chip selection and color display based on user actions.
4:29:52 Setting up app permissions and creating utility functions for image handling
4:31:56 Handling image picking and displaying
4:36:04 Display image based on user selection
4:38:10 Implementing if condition for image selection
4:42:09 Storing user ID instead of user name for flexibility and database relations.
4:44:16 Setting up table for blogs and enabling row level security.
4:48:25 Creating blog entity and model
4:50:43 Creating a Blog model for easier data handling.
4:55:08 Using datetime for updated at value and converting string to datetime
4:57:22 Implementing JSON serialization to fetch and process blog data.
5:01:29 Uploading and retrieving images using Superbase storage.
5:03:38 Creating blog repository interface in the domain layer
5:07:58 Implementing remote data source for uploading images
5:10:07 Updating blog model with image URL
5:14:33 Creating a new blog block in the presentation layer
5:16:43 Implementing blog upload functionality with Bloc in Flutter
5:21:03 Registering data source, repository, use case, and bloc using service locator
5:23:15 Adding form validation logic to the Blog Editor part.
5:27:29 Implementing complex logic for uploading a blog post
5:29:39 Implementing failure and success states in Bloc
5:33:59 Implement get all blogs function in data source and display on homepage.
5:35:58 Utilizing foreign key to retrieve user information efficiently
5:40:04 Avoid storing unnecessary fields in the model
5:42:03 Accessing data from profiles table in Flutter using Clean Architecture
5:46:24 Creating custom event handler in Flutter Clean Architecture
5:48:35 Bloc success event needs to be emitted differently to handle display and upload success.
5:52:56 Implementing list view builder for displaying blogs.
5:55:03 Creating a blog display card
5:59:09 Customizing Container and Layout in Flutter
6:01:10 Adjust layout and styling for blog topics display
6:05:11 Creating a function to calculate reading time based on word count.
6:07:20 Calculating reading time based on word count and average reading speed.
6:11:31 Implementing dynamic color scheme based on blog position.
6:13:38 Adjusted margin for spacing between blocks
6:17:50 Pass blog from route parameters and style text.
6:20:07 Formatting date and styling text in Flutter
6:24:25 Formatting the date and time in a specific pattern
6:26:35 Implementing internet connection and local storage logic
6:30:47 Implementing network-related tasks in the repository
6:32:52 Implementing error handling for no internet connection scenario.
6:36:48 Using Hive for local storage and caching
6:38:50 Integrating Hive as a local database in Flutter Clean Architecture
6:43:03 Manage local data storage efficiently in Flutter using Hive
6:45:13 Uploading local blogs and handling data storage and retrieval
6:49:29 Registering Hive box and data source in Flutter app.
6:51:36 Implementing local data source and caching using Hive database
6:55:47 Handling exceptions in Flutter Clean Architecture
6:57:58 Refactoring code for better organization
7:02:19 Centralized control through constants for easy updating
7:04:26 Clean architecture is essential for app development
This is super detailed, great work. I'll pin it:)
clear explanations 🫡 from newbie
Thank you, glad it's understandable!
Awesome! thanks for taking time to share this knowledge.
My pleasure!
most awaited!!!!
1:9:00God of flutter sir salute hai aap ko ❤
3:46:50 can you please be more specific with what this means? To what files do we add the copyWith function to? user_login.dart and user_sign_up.dart?
Oh maybe. In
auth_remote_data_sources.dart
we add ".copyWith" to the line
"return UserModel.fromJson(response.user!.toJson());"
But do we change anything on that line?
So, would it be two lines of code changing?
return UserModel.fromJson(response.user!.toJson()).copyWith();
return UserModel.fromJson(response.user!.toJson()).copyWith();
Like this?
I have implemented that Chip with (Filter Chip) at 4h :26 min .. In my version, I got rid of any stateful behaviour, No need mapping + gesture detector as well. It is built in notifier and in future, I can do HookWidget on this page. (No need set state call as well) .
video is very informative & clarity.
expecting more videos with clean arch in flutter
Thanks! Why more vids with clean arch?
@@RivaanRanawat clean arch vids
on triggering api calls using dio/http. setting up login signup auth tokens etc using bloc with clean arch
I really appretiate your efforts.
Keep it up.
Thanks a lot Rivaan!
Can't thank you enough. I am very grateful to you and I wish I could pay back the favour
Thanks man even before starting this I course I know It will be awesome ❤❤
Thank you!!
Great video. Loved it.
Thank you!
bro is flutter god. in the community,
just what i needed, thanks
Good job! Thank you very much!
Hey Rivaan thank you giving us this great tutorial. In past couple of weeks I learned dart and flutter from your 20 hour video. In this video I 'm facing a problem when I try to upload a blog this app in my virtual app gets hang and I have to restart the app and blog dosen't go back to the supabase
Thanks a lot ! Amazing work 👏👏
Thanks Suleyman!
Nice tutorial, I learn a lot from that
I have a doubt, Rivaan! How should I implement the logout? I mean, what should be the flow? Should I call logout from the blog screen? And since logout is ideally related to authentication, I cannot use the authentication repository here due to the 'S' in SOLID principles. Additionally, I cannot create a global use case, as high-level modules cannot depend on low-level authentication modules. What should be the flow?
Stop overthinking SOLID principles! signoutUseCase can be called from cubit/bloc and signout is fine in the authentication repository
Tks alot, this is actually a really good tutorial and help write actually clean code. However, in the process of using it I feel like it take too much time for just one query. So I think you can make a tutorial on a simplified version of this clean architecture.
thats the neat part about clean architecture. in enterprise level apps you need to maintain a lot of code and clean architecture does that for you. dont worry it has a steep learning curve but it is worth it
thanks god for sending Rivaan
Thank You Rivaan❤
Thank you, glad to learn the foundation of clean architecture from you. Will you work on the full stack Flutter - Social Post Scheduler project?
Great job ! 👍
thank you!
God sent you for flutter developers. ♥♥♥♥♥♥♥♥♥♥♥♥♥♥
Finally a much industry video. Thanks much Rivaan. You save the day. In case with don't want to use BaaS but API will it have to affect the whole code?
Finshed the vedio really good xDDDDDD
Hi! Add more to this content which discusses bloc for other applications such as multi-account applications with bloc as state management
awesome content! New suscriber here!
Thank you, hope you find enough value from the channel!
thanks sir😍, it was very helpful video
Glad it helped!
at 5:41:53 can't we just do a null check in fromJson method, i think that's better than writing the copyWith method inside the remote call,
and thanks for the amazing tutorial.
Thanks for your sharing this tutorial as it helps me a lot to understand the clean architecture in the practice. May I ask your help to explain:
- when the session user will be timeout so that user will go to the sign in page again
- where we should put the button for the user to log out on this application
In my opinion, he should have used the onAuthStageChange provided by Supabase to handle the session expired, and the logout i just put it on the user page (you can make one your own)
Rivaan, with all due respect to `fpdart` package, why would you use it since Dart has Records?
My example of an API method...
Future getMyResponse()
Then in the code, if it returns properly, I return an instance of MyResponse and I return null for the `error`.
If it returns an error, I return null for the response and some error.
Does this make sense?
It's pretty clean and we utilize new Dart feature without using additional packages.
Hi. If I have to implement a monthly or yearly subscription model for my mobile application. Then is it mandatory to use In-App-Purchases ? I mean we cannot use an external payment gateway. How Netflix is redirecting users to its website to avoid 30% fees. Please talk about this.
Hii you are the best keep doing project it will helpful to more people and i am requesting you to make a video on animation app
I have a doubt how you will check if user is authenticated or not for thate before u have to check if there internet connection or not 2:50
Thank you very much bro ❤️
That hive still feels annoying and quite hard to understand, and thank you rivan for this super video this is much helpful.
Much Needed 😊
Let me know how it goes!
Hi Rivaan, Thank you for this video.❤
Can you do a video about how properly do dynamic linking
Noted, will get to it as soon as possible :)
Thanks you very much (from congo)!!!
i am faccing the " email rate limit error " any solution please help
At 6:36:00 why are we using UserModel instead of User entity?
Thank you very much for making such videos I added a in blog feature to this app to fetch the current user blogs in a separate screen the issue I face is it overrides the the data of each other when I dispatch the user blogs event it hides the data of the blog screen and vise versa
Thankssss Rivaannnnnnnn🎉❤️❤️
Most welcome!
Thanks you so much for this video
This is awesome.
Thank you very much for the material! Tell me, please, how to use AppAuthCubit in GoRouter? Need to bind the authorization status check to the ShellRoute, do I'm understand correctly?
@RivaanRanawat I have a question: I want to implement Sign Out functionality - I could add that in 'auth layer' (which can internally call app user cubit, passing user as null, leading route change to SignInPage).....but what about the button I have to add it on Blog Feature's Page's AppBar if you get it.....
This would break clean architecture....
So Ideally I should move signout functionlity to Core...right ?
Thank you very much for the course.
There is one thing I'm struggling with and I was hoping you could help me, if your don't mine.
When using a feature first approach, what happens when you have a single local SQL database for all your app?
I understand that the creation of the database itself probably has to go to the core or shared folder.
But what happens if you have 2 features and one of them has a model that has a relationship with a model of the other feature? I'm talking about foreign keys, of course.
Can one feature be used inside another feature?
Or is it better to move all the models to the core or shared folder alongside the database creation?
actually good video
Definitely you get More Audience in your channels 😉
Thank you!