- Complete MVP with Repository Pattern, SQLite storage - Provider + ChangeNotifier state management - Navigation 2.0 with deep link support - Habit CRUD with twoDayRule, notifications, categories - Backup/Restore via JSON - Statistics with streak tracking - Material You theme support - Biometric lock support - Desktop widget support - 27 languages i18n structure - Comprehensive test suite (87/89 passing)
36 lines
1.4 KiB
Dart
36 lines
1.4 KiB
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
class AppStateManager extends ChangeNotifier {
|
|
bool _onboarding = false;
|
|
bool _statistics = false;
|
|
bool _settings = false;
|
|
bool _createHabit = false;
|
|
bool _editHabit = false;
|
|
bool _whatsNew = false;
|
|
bool _archivedHabits = false;
|
|
|
|
bool get onboarding => _onboarding;
|
|
bool get statistics => _statistics;
|
|
bool get settings => _settings;
|
|
bool get createHabit => _createHabit;
|
|
bool get editHabit => _editHabit;
|
|
bool get whatsNew => _whatsNew;
|
|
bool get archivedHabits => _archivedHabits;
|
|
|
|
void setOnboarding(bool v) { _onboarding = v; notifyListeners(); }
|
|
void setStatistics(bool v) { _statistics = v; notifyListeners(); }
|
|
void setSettings(bool v) { _settings = v; notifyListeners(); }
|
|
void setCreateHabit(bool v) { _createHabit = v; notifyListeners(); }
|
|
void setEditHabit(bool v) { _editHabit = v; notifyListeners(); }
|
|
void setWhatsNew(bool v) { _whatsNew = v; notifyListeners(); }
|
|
void setArchivedHabits(bool v) { _archivedHabits = v; notifyListeners(); }
|
|
|
|
void goOnboarding(bool v) => setOnboarding(v);
|
|
void goStatistics(bool v) => setStatistics(v);
|
|
void goSettings(bool v) => setSettings(v);
|
|
void goCreateHabit(bool v) => setCreateHabit(v);
|
|
void goEditHabit(bool v) => setEditHabit(v);
|
|
void goWhatsNew(bool v) => setWhatsNew(v);
|
|
void goArchivedHabits(bool v) => setArchivedHabits(v);
|
|
}
|