pop<T extends Object> function

Future<bool> pop<T extends Object>([
  1. T? result,
  2. bool isMaybe = false
])

返回上一个页面

Implementation

Future<bool> pop<T extends Object>([T? result, bool isMaybe = false]) {
  if (isMaybe) {
    return maybePop<T>(result);
  } else {
    assert(FlExtended().navigatorKey.currentState != null,
        'Set FlExtended().navigatorKey to one of [MaterialApp CupertinoApp WidgetsApp]');
    FlExtended().navigatorKey.currentState!.pop<T>(result);
    return Future.value(true);
  }
}