Trying to do the notification for all users.
This commit is contained in:
@@ -11,6 +11,8 @@ import 'package:travel_mate/services/error_service.dart';
|
||||
import 'package:travel_mate/services/activity_places_service.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:travel_mate/services/expense_service.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:travel_mate/services/notification_service.dart';
|
||||
import 'blocs/auth/auth_bloc.dart';
|
||||
import 'blocs/auth/auth_event.dart';
|
||||
import 'blocs/theme/theme_bloc.dart';
|
||||
@@ -34,6 +36,8 @@ import 'pages/home.dart';
|
||||
import 'pages/signup.dart';
|
||||
import 'pages/resetpswd.dart';
|
||||
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
|
||||
/// Entry point of the Travel Mate application.
|
||||
///
|
||||
/// This function initializes Flutter widgets, loads environment variables,
|
||||
@@ -42,6 +46,12 @@ void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await dotenv.load(fileName: ".env");
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
await initializeDateFormatting('fr_FR', null);
|
||||
|
||||
// Set the background messaging handler early on, as a named top-level function
|
||||
FirebaseMessaging.onBackgroundMessage(firebaseMessagingBackgroundHandler);
|
||||
|
||||
await NotificationService().initialize();
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user