58 lines
1.9 KiB
Dart
58 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hirameki_srs/src/services/vocab_deck_repository.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
import 'src/services/deck_repository.dart';
|
|
import 'src/screens/start_screen.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
try {
|
|
await dotenv.load(fileName: ".env");
|
|
} catch (e) {
|
|
// It's okay if the .env file is not found.
|
|
// This is expected in release builds.
|
|
}
|
|
|
|
runApp(
|
|
MultiProvider(
|
|
providers: [
|
|
Provider<DeckRepository>(create: (_) => DeckRepository()),
|
|
Provider<VocabDeckRepository>(create: (_) => VocabDeckRepository()),
|
|
],
|
|
child: const WkApp(),
|
|
),
|
|
);
|
|
}
|
|
|
|
class WkApp extends StatelessWidget {
|
|
const WkApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Hirameki SRS',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: ThemeData(
|
|
colorScheme: const ColorScheme(
|
|
brightness: Brightness.dark,
|
|
primary: Color(0xFF90CAF9), // Light blue for primary elements
|
|
onPrimary: Colors.black,
|
|
secondary: Color(0xFFBBDEFB), // Slightly lighter blue for secondary elements
|
|
onSecondary: Colors.black,
|
|
tertiary: Color(0xFFA5D6A7), // Light green for success/correct states
|
|
onTertiary: Colors.black,
|
|
error: Color(0xFFEF9A9A), // Light red for error states
|
|
onError: Colors.black,
|
|
surface: Color(0xFF121212), // Very dark gray
|
|
onSurface: Colors.white,
|
|
surfaceContainer: Color(0xFF1E1E1E), // Slightly lighter dark gray
|
|
surfaceContainerHighest: Color(0xFF424242), // A distinct dark gray for surface variants
|
|
onSurfaceVariant: Colors.white70,
|
|
),
|
|
useMaterial3: true,
|
|
),
|
|
home: const StartScreen(),
|
|
);
|
|
}
|
|
} |