wt1.1.2e NumberPicker
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:devicelocale/devicelocale.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:aitrainer_app/model/cache.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
|
||||
//import '../push_notifications.dart';
|
||||
|
||||
@@ -30,13 +31,28 @@ class Session {
|
||||
await AppLocalizations.delegate.load(AppLanguage().appLocal);
|
||||
print (" -- Session: fetch token..");
|
||||
await _fetchToken(_sharedPreferences);
|
||||
await _initializeFlutterFire();
|
||||
//initDeviceLocale();
|
||||
|
||||
// Create the initialization Future outside of `build`:
|
||||
|
||||
|
||||
// PushNotificationsManager().init();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Define an async function to initialize FlutterFire
|
||||
void _initializeFlutterFire() async {
|
||||
try {
|
||||
// Wait for Firebase to initialize and set `_initialized` state to true
|
||||
await Firebase.initializeApp();
|
||||
} catch (e) {
|
||||
// Set `_error` state to true if Firebase initialization fails
|
||||
print("Error initializing Firebase");
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> initDeviceLocale() async {
|
||||
List languages;
|
||||
String currentLocale;
|
||||
|
||||
Reference in New Issue
Block a user