Files
habo/lib/navigation/app_state_manager.dart
dazhuang aa69f2a91e feat: initial commit - Habo habit tracking app
- 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)
2026-04-13 15:02:30 +00:00

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);
}