40 lines
1.1 KiB
Dart
40 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'services/storage_service.dart';
|
|
import 'screens/home_screen.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
final storageService = await StorageService.init();
|
|
runApp(AeroTrackApp(storageService: storageService));
|
|
}
|
|
|
|
class AeroTrackApp extends StatelessWidget {
|
|
final StorageService storageService;
|
|
|
|
const AeroTrackApp({super.key, required this.storageService});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: '舒雾记 AeroTrack',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF2563EB),
|
|
primary: const Color(0xFF2563EB),
|
|
surface: Colors.white,
|
|
),
|
|
useMaterial3: true,
|
|
scaffoldBackgroundColor: const Color(0xFFF8FAFC),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.white,
|
|
foregroundColor: Color(0xFF0F172A),
|
|
elevation: 0,
|
|
centerTitle: false,
|
|
),
|
|
),
|
|
home: HomeScreen(storageService: storageService),
|
|
);
|
|
}
|
|
}
|