start method
Start a synchronous operation within this task named name
.
Optionally takes a Map of arguments
.
Implementation
void start(String name, {Map? arguments}) {
if (!_hasTimeline) return;
// TODO: When NNBD is complete, delete the following line.
ArgumentError.checkNotNull(name, 'name');
if (!_isDartStreamEnabled()) {
// Push a null onto the stack and return.
_stack.add(null);
return;
}
final block = _AsyncBlock._(name, _taskId);
_stack.add(block);
block._start({
...?arguments,
if (_parent != null) 'parentId': _parent._taskId.toRadixString(16),
if (_filterKey != null) _kFilterKey: _filterKey,
});
}