main function

void main()

Entry point of the BicoRush app.

This function launches the application by running the MyApp widget.

Implementation

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

  final FirebaseFirestore firestore = FirebaseFirestore.instance;
  final FirebaseAuth firebaseAuth = FirebaseAuth.instance;

  final NotificationService notificationService = NotificationService();
  notificationService.initNotification();
  notificationService.notificationPlugin
      .resolvePlatformSpecificImplementation<
        AndroidFlutterLocalNotificationsPlugin
      >()
      ?.requestNotificationsPermission();

  runApp(
    MyApp(
      firestore: firestore,
      firebaseAuth: firebaseAuth,
      notificationService: notificationService,
    ),
  );
}