完成 方法

void finish({
  1. Map? arguments,
})

完成最后启动的同步操作。可选地接收一个 Map 类型的 arguments

实现

void finish({Map? arguments}) {
  if (!_hasTimeline) {
    return;
  }
  if (_stack.length == 0) {
    throw new StateError('Uneven calls to start and finish');
  }
  if (_filterKey != null) {
    arguments ??= {};
    arguments[_kFilterKey] = _filterKey;
  }
  // Pop top item off of stack.
  var block = _stack.removeLast();
  if (block == null) {
    // Dart stream was disabled when start was called.
    return;
  }
  block._finish(arguments);
}