You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
899 B
37 lines
899 B
import 'package:flutter/material.dart';
|
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
import 'routes.dart';
|
|
import 'theme.dart';
|
|
import 'services/api_auth_service.dart';
|
|
import 'services/deck_storage.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await dotenv.load(fileName: '.env').catchError(
|
|
(_) => dotenv.load(fileName: '.env.example'),
|
|
);
|
|
|
|
await DeckStorage().initialize();
|
|
await ApiAuthService.instance.init();
|
|
runApp(const DeckyApp());
|
|
}
|
|
|
|
class DeckyApp extends StatelessWidget {
|
|
const DeckyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'omotomo',
|
|
theme: AppTheme.lightTheme,
|
|
darkTheme: AppTheme.darkTheme,
|
|
themeMode: ThemeMode.dark,
|
|
initialRoute: Routes.deckList,
|
|
routes: Routes.routes,
|
|
debugShowCheckedModeBanner: false,
|
|
);
|
|
}
|
|
}
|
|
|