JobBase<T> constructor
JobBase<T> ({
- Object? key,
- String describe()?,
- bool cancellable = true,
- Duration? timeout,
- JobObserver? observer,
Creates a job that has not started yet.
The named parameters are those of Job.new, timeout included, and
so are the errors: ArgumentError for a timeout that is zero or
negative, or that comes with cancellable: false.
Implementation
JobBase({
Object? key,
String Function()? describe,
bool cancellable = true,
Duration? timeout,
JobObserver? observer,
}) : _timeout = _checkTimeout(timeout, cancellable: cancellable),
_timeoutTrace = timeout == null ? null : StackTrace.current,
_key = key,
_describe = describe,
_cancellable = cancellable,
_observer = observer {
_builtOnCore[this] = true;
}