import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:firebase_core/firebase_core.dart'; import 'firebase_options.dart'; import 'app.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); await initializeDateFormatting('id', null); runApp(const ProviderScope(child: JarvisApp())); } class JarvisApp extends ConsumerWidget { const JarvisApp({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { final router = ref.watch(routerProvider); return MaterialApp.router( title: 'Jarvis', theme: _buildTheme(), routerConfig: router, debugShowCheckedModeBanner: false, ); } ThemeData _buildTheme() { const primary = Color(0xFF1D9E75); return ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed(seedColor: primary, primary: primary), scaffoldBackgroundColor: const Color(0xFFF4F6F8), appBarTheme: const AppBarTheme( backgroundColor: Color(0xFFFFFFFF), foregroundColor: Color(0xFF1A1A2E), elevation: 0, centerTitle: false, titleTextStyle: TextStyle(color: Color(0xFF1A1A2E), fontSize: 17, fontWeight: FontWeight.w700), ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: const Color(0xFFFFFFFF), contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), border: OutlineInputBorder(borderRadius: BorderRadius.circular(10), borderSide: const BorderSide(color: Color(0xFFE8EAED))), enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(10), borderSide: const BorderSide(color: Color(0xFFE8EAED))), focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(10), borderSide: const BorderSide(color: primary, width: 1.5)), hintStyle: const TextStyle(color: Color(0xFF6B7280), fontSize: 14), ), elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( backgroundColor: primary, foregroundColor: Colors.white, elevation: 0, minimumSize: const Size(double.infinity, 48), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), textStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600), ), ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: primary, side: const BorderSide(color: primary), minimumSize: const Size(double.infinity, 48), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), ), floatingActionButtonTheme: const FloatingActionButtonThemeData( backgroundColor: primary, foregroundColor: Colors.white, ), ); } }