I want to split my app into features and each feature in a package, so how can we apply dependency injection using get_it in each package individually
"each package represent a feature containing all business logic and ui for that feature"
I want to split my app into features and each feature in a package, so how can we apply dependency injection using get_it in each package individually
"each package represent a feature containing all business logic and ui for that feature"
Copyright © 2021 Jogjafile Inc.
Create a new
Interfaceas a contract for the methods you are going to use from this package.Then, implement this interface in a new class and wrap the package inside this class with the implementation of the package.
Finally, use your service locator with this class in the same way that you always doing with your normal classes.
Ex.