pop<T extends Object> method

void pop<T extends Object>([
  1. T? result
])

pop with arguments similar to Navigator.of(context).pop same as popUntil(uris.last)

Implementation

void pop<T extends Object>([T? result]) async {
  String target = await NavigatorChannel.findPopTarget();
  if (target == '') {
    /// not find target in native,it's not 'multiple' mode, find in Flutter
    if (_history.length <= 1) {
      return;
    }
    popUntil(_history[_history.length - 2].path!, result);
  } else {
    ///find int native, it's 'multiple' mode
    popUntil(target, result);
  }
}