needsRestart static method

bool needsRestart(
  1. BuildContext context, [
  2. VyuhFailure? failure
])

Whether only a restart can help: there is no router yet, or the platform failed to initialize.

Implementation

static bool needsRestart(BuildContext context, [VyuhFailure? failure]) =>
    failure?.kind == FailureKind.init ||
    GoRouter.maybeOf(context) == null ||
    (!canGoHome(context, failure) && !canGoBack(context));