Refactor: Implement multi-item inventory for Pad Tracker and dynamic navigation

This commit is contained in:
2026-01-02 18:10:50 -06:00
parent 56683f5407
commit 8772b56f36
44 changed files with 3515 additions and 781 deletions

View File

@@ -8,6 +8,7 @@ import 'screens/splash_screen.dart';
import 'models/user_profile.dart';
import 'models/cycle_entry.dart';
import 'providers/user_provider.dart';
import 'services/notification_service.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
@@ -28,6 +29,8 @@ void main() async {
Hive.registerAdapter(BibleTranslationAdapter());
Hive.registerAdapter(ScriptureAdapter());
Hive.registerAdapter(AppThemeModeAdapter()); // Register new adapter
Hive.registerAdapter(SupplyItemAdapter());
Hive.registerAdapter(PadTypeAdapter());
// Open boxes and load scriptures in parallel
await Future.wait([
@@ -36,9 +39,13 @@ void main() async {
ScriptureDatabase().loadScriptures(),
]);
// Initialize notifications
await NotificationService().initialize();
runApp(const ProviderScope(child: ChristianPeriodTrackerApp()));
}
// Helper to convert hex string to Color
Color _colorFromHex(String hexColor) {
try {