misc
This commit is contained in:
parent
8bff1adcf7
commit
8d9678ede1
|
@ -42,19 +42,15 @@ Future<void> initializeApp() async {
|
||||||
_initializeSystemSettings();
|
_initializeSystemSettings();
|
||||||
await _initializeFlutterFlow();
|
await _initializeFlutterFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeStorageHelpers() async {
|
Future<void> _initializeStorageHelpers() async {
|
||||||
await StorageUtil().ensureInitialization();
|
await StorageUtil().ensureInitialization();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeTracking() async {
|
Future<void> _initializeTracking() async {
|
||||||
await AppTrackingTransparency.requestTrackingAuthorization();
|
await AppTrackingTransparency.requestTrackingAuthorization();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeFirebase() async {
|
Future<void> _initializeFirebase() async {
|
||||||
await Firebase.initializeApp();
|
await Firebase.initializeApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeNotificationService() async {
|
Future<void> _initializeNotificationService() async {
|
||||||
await NotificationService.initialize();
|
await NotificationService.initialize();
|
||||||
}
|
}
|
||||||
|
@ -62,7 +58,6 @@ Future<void> _initializeNotificationService() async {
|
||||||
void _initializeUrlStrategy() {
|
void _initializeUrlStrategy() {
|
||||||
setUrlStrategy(PathUrlStrategy());
|
setUrlStrategy(PathUrlStrategy());
|
||||||
}
|
}
|
||||||
|
|
||||||
void _initializeSystemSettings() {
|
void _initializeSystemSettings() {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
|
@ -81,7 +76,6 @@ Future<void> _initializeFlutterFlow() async {
|
||||||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||||
usePathUrlStrategy();
|
usePathUrlStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
||||||
if (message.data['click_action'] == 'enroll_cond') {
|
if (message.data['click_action'] == 'enroll_cond') {
|
||||||
StorageUtil().haveLocal = true;
|
StorageUtil().haveLocal = true;
|
||||||
|
@ -94,7 +88,6 @@ Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
||||||
payload: Map<String, String>.from(message.data));
|
payload: Map<String, String>.from(message.data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
|
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
|
||||||
if (message.data['click_action'] == 'enroll_cond') {
|
if (message.data['click_action'] == 'enroll_cond') {
|
||||||
log('backgroundHandlerMessage');
|
log('backgroundHandlerMessage');
|
||||||
|
@ -111,7 +104,6 @@ class App extends StatefulWidget {
|
||||||
|
|
||||||
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
|
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppState extends State<App> with WidgetsBindingObserver {
|
class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
Locale? _locale = FFLocalizations.getStoredLocale();
|
Locale? _locale = FFLocalizations.getStoredLocale();
|
||||||
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
||||||
|
@ -302,3 +294,4 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue