This commit refactors the user management system to utilize UserCubit, improving state management and separation of concerns. - Replaces UserService with UserCubit for managing user state. - Introduces AppSettings and GlobalSettings models and repositories for managing app-level settings and configurations. - Modifies dependency injection to register the new repositories and cubits. - Updates UI components (LoginPage, SettingsPage, HomePage, AddTransactionDialog, CategoryListPage, TagListPage) to interact with UserCubit and SettingsCubit. - Removes direct dependency on UserRepository in favor of UserCubit for accessing user information. - Streamlines the authentication process by using UserCubit to handle user creation and login. - Improves settings management by using dedicated repositories and cubits for app settings.
10 lines
424 B
Dart
10 lines
424 B
Dart
|
|
/// Интерфейс для глобальных настроек, не связанных с конкретным пользователем
|
|
abstract class IGlobalSettingsRepository {
|
|
/// Получает ID текущего пользователя
|
|
Future<String?> getCurrentUserId();
|
|
|
|
/// Устанавливает ID текущего пользователя
|
|
Future<void> setCurrentUserId(String? userId);
|
|
}
|