main function
Implementation
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Enable edge-to-edge display
await _setupEdgeToEdge(); // Setup edge-to-edge display.
try {
await Firebase.initializeApp();
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
await setupFirebaseMessaging();
}
} catch (e) {
debugPrint('Firebase initialization error: $e');
}
await RemoteConfigService().initialize();
await ApiService.initializeBaseURL();
await checkNotificationPermissionOnce();
runApp(const MyApp());
// Initializes the app and runs the MyApp widget.
}