onError method

  1. @override
  2. @override
void onError(
  1. FlutterErrorDetails details
)
inherited

All views of an application are hidden, either because the application is The application is not currently visible to the user, not responding to user input, and running in the background. The application is visible and responding to user input. Either be in the progress of attaching when the engine is first initializing or after the view being destroyed due to a Navigator pop. Called whenever the application is reassembled during debugging, for example during hot reload. Called when a request is received from the system to exit the application. Called when the system tells the app to pop the current route. For example, on Android, this is called when the user presses the back button. Called when the host tells the app to push a new route onto the navigator. Called when the host tells the application to push a new RouteInformation and a restoration state onto the router. Called when this State is first added to as a Route observer?! New route has been pushed, and this State object's route is no longer current. Called when this State is popped off a route. The top route has been popped off, and this route shows up. Called at the start of a predictive back gesture. If an observer returns true then that observer, and only that observer, will be notified of subsequent events in this same gesture (for example handleUpdateBackGestureProgress, etc.).

Observers are expected to return true if they were able to handle the notification, If all observers indicate they are not handling this back gesture by returning false, then a navigation pop will result when handleCommitBackGesture is called, as in a non-predictive system back gesture.

Currently, this is only used on Android devices that support the predictive back feature. Called when a predictive back gesture moves.

The observer which was notified of this gesture's handleStartBackGesture is the same observer notified for this.

Currently, this is only used on Android devices that support the predictive back feature. Called when a predictive back gesture is finished successfully, indicating that the current route should be popped.

The observer which was notified of this gesture's handleStartBackGesture is the same observer notified for this. If there is none, then a navigation pop will result, as in a non-predictive system back gesture.

Currently, this is only used on Android devices that support the predictive back feature. Called when a predictive back gesture is canceled, indicating that no navigation should occur.

The observer which was notified of this gesture's handleStartBackGesture is the same observer notified for this.

Currently, this is only used on Android devices that support the predictive back feature. Offer an error handler

Implementation

@override
// void inactiveAppLifecycleState() {
//   // Optionally call super for debugPrint()
//   super.inactiveAppLifecycleState();
// }

/// All views of an application are hidden, either because the application is
// @override
// void hiddenAppLifecycleState() {
//   // Optionally call super for debugPrint()
//   super.hiddenAppLifecycleState();
// }

/// The application is not currently visible to the user, not responding to
/// user input, and running in the background.
// @override
// void pausedAppLifecycleState() {
//   // Optionally call super for debugPrint()
//   super.pausedAppLifecycleState();
// }

/// The application is visible and responding to user input.
// @override
// void resumedAppLifecycleState() {
//   // Optionally call super for debugPrint()
//   super.resumedAppLifecycleState();
// }

/// Either be in the progress of attaching when the  engine is first initializing
/// or after the view being destroyed due to a Navigator pop.
// @override
// void detachedAppLifecycleState() {
//   // Optionally call super for debugPrint()
//   super.detachedAppLifecycleState();
// }

/// Called whenever the application is reassembled during debugging, for
/// example during hot reload.
// @override
// void reassemble() {
//   // Optionally call super for debugPrint()
//   super.reassemble();
// }

/// Called when a request is received from the system to exit the application.
// @override
// Future<AppExitResponse> didRequestAppExit() async {
//   // Optionally call super for debugPrint()
//   return super.didRequestAppExit();
// }

/// Called when the system tells the app to pop the current route.
/// For example, on Android, this is called when the user presses
/// the back button.
// @override
// Future<bool> didPopRoute() async {
//   // Optionally call super for debugPrint()
//   return super.didPopRoute();
// }

/// Called when the host tells the app to push a new route onto the
/// navigator.
// @override
// Future<bool> didPushRoute(String route) async {
//   // ignore: deprecated_member_use_from_same_package
//   return super.didPushRoute(route);
// }

/// Called when the host tells the application to push a new
/// [RouteInformation] and a restoration state onto the router.
// @override
// Future<bool> didPushRouteInformation(
//     RouteInformation routeInformation) async {
//   // Optionally call super for debugPrint()
//   return super.didPushRouteInformation(routeInformation);
// }

/// Called when this State is *first* added to as a Route observer?!
// @override
// void didPush() {
//   // Optionally call super for debugPrint()
//   super.didPush();
// }

/// New route has been pushed, and this State object's route is no longer current.
// @override
// void didPushNext() {
//   // Optionally call super for debugPrint()
//   super.didPushNext();
// }

/// Called when this State is popped off a route.
// @override
// void didPop() {
//   // Optionally call super for debugPrint()
//   super.didPop();
// }

/// The top route has been popped off, and this route shows up.
// @override
// void didPopNext() {
//   // Optionally call super for debugPrint()
//   super.didPopNext();
// }

/// Called at the start of a predictive back gesture.
/// If an observer returns true then that observer, and only that observer,
/// will be notified of subsequent events in
/// this same gesture (for example [handleUpdateBackGestureProgress], etc.).
///
/// Observers are expected to return true if they were able to handle the
/// notification, If all observers indicate they are not handling this back gesture by
/// returning false, then a navigation pop will result when
/// [handleCommitBackGesture] is called, as in a non-predictive system back
/// gesture.
///
/// Currently, this is only used on Android devices that support the
/// predictive back feature.
// @override
// bool handleStartBackGesture(PredictiveBackEvent backEvent) {
//   // Optionally call super for debugPrint()
//   return super.handleStartBackGesture(backEvent);
// }

/// Called when a predictive back gesture moves.
///
/// The observer which was notified of this gesture's [handleStartBackGesture]
/// is the same observer notified for this.
///
/// Currently, this is only used on Android devices that support the
/// predictive back feature.
// @override
// void handleUpdateBackGestureProgress(PredictiveBackEvent backEvent) {
//   // Optionally call super for debugPrint()
//   return super.handleUpdateBackGestureProgress(backEvent);
// }

/// Called when a predictive back gesture is finished successfully, indicating
/// that the current route should be popped.
///
/// The observer which was notified of this gesture's [handleStartBackGesture]
/// is the same observer notified for this. If there is none, then a
/// navigation pop will result, as in a non-predictive system back gesture.
///
/// Currently, this is only used on Android devices that support the
/// predictive back feature.
// @override
// void handleCommitBackGesture() {
//   // Optionally call super for debugPrint()
//   return super.handleCommitBackGesture();
// }

/// Called when a predictive back gesture is canceled, indicating that no
/// navigation should occur.
///
/// The observer which was notified of this gesture's [handleStartBackGesture]
/// is the same observer notified for this.
///
/// Currently, this is only used on Android devices that support the
/// predictive back feature.
// @override
// void handleCancelBackGesture() {
//   // Optionally call super for debugPrint()
//   return super.handleCommitBackGesture();
// }

/// Offer an error handler
@override
void onError(FlutterErrorDetails details) {
  // Optionally call super for debugPrint()
  assert(() {
    if (_debugPrintEvents) {
      debugPrint('$_consoleLeadingLine onError() in $_consoleClassName');
    }
    return true;
  }());
}