The first problem you'll run into as your app grows is that it can easily become spaghetti code .
If you develop while paying attention to dependencies to avoid spaghetti code, you will end up applying design patterns.
Even if you develop using clean architecture, the code for injecting dependencies ends up becoming quite complex.
In this lecture, we will present a guide to proper dependency injection in Flutter projects.
DI Library 📖
Flutter has many libraries that help with DI (dependency injection). In this tutorial we will use the Injectable library, which does not depend on any specific state management tool.
Injectable library used in lectures
Who should take this course 🙆♀️
If your DI setup so far is similar to or worse than the following code, then you should take this course.
So, after listening to the lecture!
✅ After taking this course, the code where people directly do DI, as shown above, will be removed.
✅ You can deliver instances in the desired format at the appropriate time.
Why DI is needed Let me give you some perspective.
This is structured so that you can feel the need for DI by refactoring or rewriting examples covered in previous lectures from a different perspective.
When developing small apps, you may thinklessly use all objects as singletons. However, this is not a good practice for medium-sized or larger apps. Learn about this problem while refactoring existing apps.
This is a refactoring course that starts by downloading the source code of 'Flutter Intermediate Part 1 - Clean Architecture'.
As we work through the issues, we refine the code to make it better.
Have you ever experienced delays in the development period due to implementing detailed functions when creating an app? Experience a new development method by rewriting the 'Mask Inventory' app in a way that considers clean architecture and DI.
Leverage DI to quickly build apps by mocking data and easily replace it with real data later.
At first, we develop the app by testing it based on fake objects.
After the app is complete, we use the DI library to replace it with real data.
[Oh Jun-seok's Flutter App Development Series] Lecture Selection Guide 👀
Make sure this is the course you need to study. (Click on the image to view it in a new window.)
Things to note before taking the class 📢
This course will be conducted in the following environment:
Practice environment
Operating System and Version (OS): Targeting Android in a macOS environment
Tools used: Android Studio Flamingo or higher, Flutter 3, Dart 3 or higher
Learning Materials
We provide a download of starter code for the refactoring section.
The rewrite section provides the completed source code.
Player knowledge and notes, related lectures
This is an intermediate course for those who have previously learned MVVM and Clean Architecture.
Recommended for these people
Who is this course right for?
For those interested in a guide on dependency injection in Flutter
Those who want to know the advantages of dependency injection
As expected, the lectures of Professor Oh Jun-seok, whom I trust and watch, are so good! I had a lot of concerns about the part of structuring a project recently, and it helped me a lot. Thank you for the great lecture!
I highly recommend it to those who want to get one step closer to clean architecture.
I'm learning a lot from Clean Architecture to DI. Thank you. I highly recommend that you listen to "Flutter Intermediate Part 1 - Clean Architecture" and then take the course.
Certainly, Flutter is taught by the undisputed Mr. Oh Jun-seok. The DI lectures that are never taught anywhere else... I was able to master the DI part because he explained it in such detail. Thank you. Please make more lectures. I don't regret spending money at all.
Many people have to use Di when collaborating on a project. Otherwise, there will be too much duplicate code. However, although this Di technology is absolutely necessary, it is difficult to learn unless you are in the field. However, this lecture will teach you various things from whether Di is good to how to use it, and will also guide you on methods that can be used in the field. You don't have to use it exactly as in the lecture, but it is worth listening to it once. If you learn Di conceptually, it will be of great help in your future development. You should definitely use it in the field.