- Add flutter_local_notifications ^21.0.0, timezone ^0.11.0, flutter_timezone ^1.0.8 to pubspec.yaml - Set compileSdk=35, enable core library desugaring in build.gradle.kts - Add POST_NOTIFICATIONS, RECEIVE_BOOT_COMPLETED permissions and boot receivers to AndroidManifest.xml - Create NotificationService singleton with initialize, requestPermission, scheduleDailyNotification, cancelAll - Add getOverdueAndTodayTaskCount and getOverdueTaskCount one-shot queries to DailyPlanDao - Initialize timezone and NotificationService in main.dart before runApp - Add 7 notification-related ARB strings to app_de.arb - All 72 existing tests pass
18 lines
683 B
Dart
18 lines
683 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:flutter_timezone/flutter_timezone.dart';
|
|
import 'package:timezone/data/latest_all.dart' as tz;
|
|
import 'package:timezone/timezone.dart' as tz;
|
|
|
|
import 'package:household_keeper/app.dart';
|
|
import 'package:household_keeper/core/notifications/notification_service.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
tz.initializeTimeZones();
|
|
final timeZoneName = await FlutterTimezone.getLocalTimezone();
|
|
tz.setLocalLocation(tz.getLocation(timeZoneName));
|
|
await NotificationService().initialize();
|
|
runApp(const ProviderScope(child: App()));
|
|
}
|