Initial commit: Fixes for linting and compilation

This commit is contained in:
2025-12-20 03:13:55 +00:00
commit 5d746d694e
148 changed files with 11207 additions and 0 deletions

49
lib/main.dart Normal file
View File

@@ -0,0 +1,49 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:google_fonts/google_fonts.dart';
import 'theme/app_theme.dart';
import 'screens/splash_screen.dart';
import 'models/user_profile.dart';
import 'models/cycle_entry.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initialize Hive for local storage
await Hive.initFlutter();
// Register Hive adapters
Hive.registerAdapter(UserProfileAdapter());
Hive.registerAdapter(CycleEntryAdapter());
Hive.registerAdapter(RelationshipStatusAdapter());
Hive.registerAdapter(FertilityGoalAdapter());
Hive.registerAdapter(MoodLevelAdapter());
Hive.registerAdapter(FlowIntensityAdapter());
Hive.registerAdapter(CervicalMucusTypeAdapter());
Hive.registerAdapter(CyclePhaseAdapter());
Hive.registerAdapter(UserRoleAdapter());
// Open boxes
await Hive.openBox<UserProfile>('user_profile');
await Hive.openBox<CycleEntry>('cycle_entries');
runApp(const ProviderScope(child: ChristianPeriodTrackerApp()));
}
class ChristianPeriodTrackerApp extends StatelessWidget {
const ChristianPeriodTrackerApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Christian Period Tracker',
debugShowCheckedModeBanner: false,
theme: AppTheme.lightTheme,
darkTheme: AppTheme.darkTheme,
themeMode: ThemeMode.system,
home: const SplashScreen(),
);
}
}