There's a better way for Flutter developers to introduce an architecture in their codebase. This is what we cover in this short. Below you can find the link to the idea: Separate UI and state code: open.substack....
but how do you apply this in a big project with multiple developers? You need to have a blueprint if it is a teamwork, we can't just go re-doing everything.
you apply it all the same. State management is a small part of software architecture. And working in a well structured codebase has nothing to do with the state management solution, any one is fine. The things that make a good codebase to work in is following software engineering fundamentals: - Clear separation of concerns - Inversion of Control applied - Single responsibility - Testable code base with unit tests Literally any state management solution will work, you can simply apply the 4 principles above to your codebase and you'll have a maintainable codebase for a team to work in.
I'm using Stacked for a project. I want to know if I can create a repository for example to link a local Storage data, and implement it; then call that implementation in a created service by stacked. Thanks in advanced
@@FilledStacks could you explain me with more details? thanks you. in the domain layer I have: domain/repositories/local_secure_storage_respository.dart This file is an abstract class with the methods that make contracts. In the infrastructure layer I have: /infrastructure/datasources/local_secure_storage_datasource.dart A class that directly implements the methods of the "local_secure_storage_respository.dart" abstract class to manipulate data to be stored locally. In this same infrastructure layer I have: /infrastructure/repositories_impl/local_secure_storage_respository_impl.dart This is the class that extends the "LocalSecureRepository" abstract class (which is in the domain layer) and implements its methods, using the "LocalSecureStorageDatasource" class (which is in the infrastructure layer) My question is how can I make this last class "LocalSecureStorageRepositoryImpl" become a service to call in my project, using stacked?
@@IngPedroAraujo You register it in app.dart and then locate it through the locator. The same as the other services. Why can't you register it on app.dart at the moment?