popSingle static method
Implementation
static void popSingle(
BuildContext context, {
bool rootNavigator = false,
Object? result,
}) {
final nested = Provided.find<NestedNavigatorContainer>(context);
if (nested?.navigatorKey != null) {
nested!.navigatorKey?.currentState?.pop(result);
} else {
return Navigator.of(context, rootNavigator: rootNavigator).pop(result);
}
}