finishSync static method Null safety
Finish the last synchronous operation that was started.
Implementation
static void finishSync() {
if (!_hasTimeline) {
return;
}
if (_stack.isEmpty) {
throw new StateError('Uneven calls to startSync and finishSync');
}
// Pop top item off of stack.
var block = _stack.removeLast();
if (block == null) {
// Dart stream was disabled when startSync was called.
return;
}
// Finish it.
block.finish();
}