import "package:flutter/material.dart"; import "package:go_router/go_router.dart"; import "package:hive_flutter/hive_flutter.dart"; import "pages/home_page.dart"; import "pages/station_selection_page.dart"; import "pages/trip_list_page.dart"; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Hive.initFlutter(); runApp(MyApp()); } class MyApp extends StatelessWidget { MyApp({super.key}); final _router = GoRouter( routes: [ HomePage.route, StationSelectionPage.route, TripListPage.route, ], ); @override Widget build(BuildContext context) { return MaterialApp.router( routerConfig: _router, title: "Bus Running Record", theme: ThemeData( colorScheme: const ColorScheme.dark( primary: Color(0xFF00A9CE), onPrimary: Colors.black, surface: Color(0xFF1E1E1E), onSurface: Color(0xFFEEEEEE), surfaceContainerHighest: Color(0xFF2A2A2A), error: Color(0xFFCF6679), ), scaffoldBackgroundColor: const Color(0xFF121212), cardTheme: const CardThemeData( color: Color(0xFF1E1E1E), elevation: 0, shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(3)), side: BorderSide(color: Color(0xFF2E2E2E)), ), ), appBarTheme: const AppBarTheme( backgroundColor: Color(0xFF1A1A1A), foregroundColor: Color(0xFFEEEEEE), elevation: 0, titleTextStyle: TextStyle( color: Color(0xFFEEEEEE), fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: 0.5, ), ), inputDecorationTheme: const InputDecorationTheme( border: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(3)), borderSide: BorderSide(color: Color(0xFF3A3A3A)), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(3)), borderSide: BorderSide(color: Color(0xFF3A3A3A)), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(3)), borderSide: BorderSide(color: Color(0xFF00A9CE), width: 1.5), ), filled: true, fillColor: Color(0xFF252525), labelStyle: TextStyle(color: Color(0xFF999999)), hintStyle: TextStyle(color: Color(0xFF555555)), contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 14), ), elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF00A9CE), foregroundColor: Colors.black, elevation: 0, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(3)), ), textStyle: const TextStyle( fontWeight: FontWeight.w700, fontSize: 14, letterSpacing: 0.5, ), ), ), dividerTheme: const DividerThemeData( color: Color(0xFF2E2E2E), thickness: 1, ), useMaterial3: true, ), ); } }