You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
D/FlutterLocationService(26426): Creating service.
D/FlutterLocationService(26426): Binding to location service.
E/flutter (26426): [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
E/flutter (26426): [ERROR:flutter/runtime/runtime_controller.cc(462)] Could not create root isolate.
E/flutter (26426): [ERROR:flutter/shell/common/shell.cc(669)] Could not launch engine with configuration.
/// Initializes the app
class InitializationScreen extends ConsumerStatefulWidget {
/// Creates a new [InitializationScreen]
const InitializationScreen({super.key});
if (context.mounted) {
// TODO(RV): check if the context is really needed for NotificationService
await NotificationService.instance.init(context: context);
}
await KeyService.instance.init();
logger.d('App initialized');
if (context.mounted) {
if (ref.read(allAccountsProvider).isEmpty) {
context.goNamed(Routes.welcome);
} else {
context.goNamed(Routes.mail);
}
}
D/FlutterLocationService(26426): Creating service.
D/FlutterLocationService(26426): Binding to location service.
E/flutter (26426): [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
E/flutter (26426): [ERROR:flutter/runtime/runtime_controller.cc(462)] Could not create root isolate.
E/flutter (26426): [ERROR:flutter/shell/common/shell.cc(669)] Could not launch engine with configuration.
import 'dart:async';
import 'package:enough_platform_widgets/enough_platform_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'account/provider.dart';
import 'app_lifecycle/provider.dart';
import 'background/provider.dart';
import 'keys/service.dart';
import 'localization/app_localizations.g.dart';
import 'lock/provider.dart';
import 'logger.dart';
import 'notification/service.dart';
import 'routes/provider.dart';
import 'routes/routes.dart';
import 'scaffold_messenger/service.dart';
import 'screens/screens.dart';
import 'settings/provider.dart';
import 'settings/theme/provider.dart';
import 'share/provider.dart';
// AppStyles appStyles = AppStyles.instance;
void main() {
runApp(const InitializationScreen());
}
/// Runs the app
class EnoughMailApp extends HookConsumerWidget {
/// Creates a new app
const EnoughMailApp({
super.key,
required this.appName,
});
final String appName;
@OverRide
Widget build(BuildContext context, WidgetRef ref) {
useOnAppLifecycleStateChange((previous, current) {
logger.d('raw AppLifecycleState changed from $previous to $current');
ref.read(rawAppLifecycleStateProvider.notifier).state = current;
});
}
}
/// Initializes the app
class InitializationScreen extends ConsumerStatefulWidget {
/// Creates a new [InitializationScreen]
const InitializationScreen({super.key});
@OverRide
ConsumerState createState() =>
_InitializationScreenState();
}
class _InitializationScreenState extends ConsumerState {
@OverRide
void initState() {
_initApp();
super.initState();
}
Future _initApp() async {
await ref.read(settingsProvider.notifier).init();
await ref.read(realAccountsProvider.notifier).init();
// await ref.read(backgroundProvider.notifier).init();
}
@OverRide
Widget build(BuildContext context) => const SplashScreen();
}
added this by me
void main() {
runApp(const InitializationScreen());
}
The text was updated successfully, but these errors were encountered: