~repos /only-bible-app

#kotlin#android#ios

GIT_CONFIG_PARAMETERS="'http.version=HTTP/1.1'" git clone https://git.pyrossh.dev/only-bible-app.git
Discussions: https://groups.google.com/g/rust-embed-devs

The only bible app you will ever need. No ads. No in-app purchases. No distractions.


Files changed (1) hide show
  1. lib/main.dart +11 -6
lib/main.dart CHANGED
@@ -47,8 +47,10 @@ void main() async {
47
47
  debugPrint("${errorDetails.stack}");
48
48
  }
49
49
  SchedulerBinding.instance.addPostFrameCallback((d) {
50
+ final context = navigatorKey.currentContext;
51
+ if (context == null || !context.mounted) return;
50
52
  showReportError(
51
- navigatorKey.currentState!.context,
53
+ context,
52
54
  errorDetails.exception.toString(),
53
55
  errorDetails.stack,
54
56
  );
@@ -59,11 +61,14 @@ void main() async {
59
61
  debugPrint("PlatformError: $error");
60
62
  debugPrint("$stack");
61
63
  }
64
+ final context = navigatorKey.currentContext;
65
+ if (context != null && context.mounted) {
62
- showReportError(
66
+ showReportError(
63
- navigatorKey.currentState!.context,
67
+ context,
64
- error.toString(),
68
+ error.toString(),
65
- stack,
69
+ stack,
66
- );
70
+ );
71
+ }
67
72
  return true;
68
73
  };
69
74
  await SoLoud.instance.init();