onError method

  1. @override
void onError(
  1. BuildContext context,
  2. Object error,
  3. StackTrace stackTrace
)
override

Describe what to do in the event of an error.

エラーが発生した場合の処理を記述します。

Implementation

@override
void onError(BuildContext context, Object error, StackTrace stackTrace) {
  Modal.alert(
    context,
    submitText: ml().close,
    title: ml().error,
    text: ml()
        .initializationFailedExitTheApplication
        .$(error.toString())
        .$(stackTrace),
    onSubmit: () async {
      await SystemNavigator.pop();
    },
  );
}