Тёмный

Don't "choose the best state management" 

FilledStacks
Подписаться 67 тыс.
Просмотров 6 тыс.
50% 1

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....

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@isyedaliraza
@isyedaliraza Год назад
These shorts are amazing and full of knowledge. ❤🎉
@FilledStacks
@FilledStacks Год назад
I appreciate that. I'm trying to share more thoughts more often, shorts has been a great way of doing that.
@developerexzitan
@developerexzitan 9 месяцев назад
Great explanation
@FilledStacks
@FilledStacks 9 месяцев назад
Thank you
@marufhassan634
@marufhassan634 Год назад
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.
@FilledStacks
@FilledStacks Год назад
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.
@IngPedroAraujo
@IngPedroAraujo Год назад
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
@FilledStacks Год назад
Yes you can. The same way you make any other service.
@IngPedroAraujo
@IngPedroAraujo Год назад
@@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?
@FilledStacks
@FilledStacks Год назад
@@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?
@IngPedroAraujo
@IngPedroAraujo Год назад
@@FilledStacks I solved it, in this way class LocalStorageService { LocalStorageService() { _storageRepositoryImpl = LocalSecureStorageRepositoryImpl( localSecureStorageDatasource: LocalSecureStorageDatasource(), ); } late final LocalSecureStorageRepositoryImpl _storageRepositoryImpl; Future getLoginCredentials() async { return await _storageRepositoryImpl.getLoginCredentials(); } Future removeLoginCredentials() async { _storageRepositoryImpl.removeLoginCredentials(); } Future saveLoginCredentials( LoginCredentialsEntity loginCredentialsEntity, ) async { _storageRepositoryImpl.saveLoginCredentials(loginCredentialsEntity); } }
@dev.faizan
@dev.faizan Год назад
@FilledStacks
@FilledStacks Год назад
🤗
Далее
State Management Like A Pro - Flutter Riverpod
10:30
Просмотров 76 тыс.
Human vs Jet Engine
00:19
Просмотров 110 млн
Flutter Bloc Tutorial For Beginners - Package
8:33
Просмотров 123 тыс.
Microservices are Technical Debt
31:59
Просмотров 547 тыс.
Flutter Provider State Management in 7 minutes
7:01
Просмотров 15 тыс.
What is "State" in Programming?
6:14
Просмотров 86 тыс.
Top 5 ChatGPT Use Cases for Professionals!
10:48
Просмотров 77 тыс.
Coding Predictions for 2025
16:14
Просмотров 49 тыс.
Flutter State Management - The Grand Tour
14:07
Просмотров 243 тыс.