google preperation 1

This commit is contained in:
2026-10-26 20:48:16 +01:00
parent 9a65ff7ad4
commit 3b50cb0fe9
47 changed files with 4969 additions and 4580 deletions
+27 -18
View File
@@ -1,10 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; // Import for SystemChrome
import 'package:intl/date_symbol_data_local.dart';
import 'screens/home_screen.dart';
import 'services/notification_service.dart';
import 'services/app_settings.dart';
import 'theme/app_theme.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AppSettings.instance.load();
await initializeDateFormatting(); // Slovenian month/day names for every screen
try {
await NotificationService().initialize();
} catch (_) {}
@@ -23,43 +28,47 @@ void main() async {
statusBarColor: Colors.grey[900],
systemNavigationBarColor: Colors.grey[900],
systemNavigationBarIconBrightness: Brightness.light,
// No grey scrim behind 3-button navigation; we paint the strip ourselves
systemNavigationBarContrastEnforced: false,
),
);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'SDK Muta',
title: 'SDK Kovinar',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.white),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.blue,
brightness: Brightness.dark,
),
useMaterial3: true,
dialogTheme: DialogThemeData(
backgroundColor: Colors.grey[900],
),
),
theme: AppTheme.light(),
darkTheme: AppTheme.dark(),
builder: (context, child) {
final originalTextScaler = MediaQuery.of(context).textScaler;
final clampedScale = originalTextScaler.clamp(minScaleFactor: 0.8, maxScaleFactor: 1.2);
final clampedScale =
originalTextScaler.clamp(minScaleFactor: 0.8, maxScaleFactor: 1.2);
// Edge-to-edge (Android 15+) ignores the navigation bar color, so paint
// the system bar strip ourselves on every screen, matching our bars.
final systemBar = MediaQuery.viewPaddingOf(context).bottom;
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: clampedScale,
),
child: child!,
child: Stack(
children: [
child!,
Positioned(
left: 0,
right: 0,
bottom: 0,
height: systemBar,
child: IgnorePointer(child: ColoredBox(color: AppTheme.bar)),
),
],
),
);
},
home: const HomeScreen(),