restartApp static method

void restartApp(
  1. BuildContext context
)

Implementation

static void restartApp(BuildContext context) {
  try {
    context.findAncestorStateOfType<RestartWidgetState>()?.restartApp();
    Navigator.pop(context);
  } on Exception catch (e) {
    if (kDebugMode) {
      print(e);
    }
  }
}