trcr/lib/main.dart
2025-05-10 09:51:51 -07:00

31 lines
882 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart' as bg;
import 'main_screen.dart';
import 'preferences.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Preferences.init();
await bg.BackgroundGeolocation.ready(Preferences.geolocationConfig());
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.green,
),
),
home: MainScreen(),
);
}
}