BackgroundTasks constructor
BackgroundTasks({
- void onError(
- Object error,
- StackTrace stack
Creates an empty registry.
onError is told when a task throws. It defaults to the router's error
reporter, so a failing task surfaces the same way a failing handler does
rather than vanishing.
Implementation
BackgroundTasks({void Function(Object error, StackTrace stack)? onError})
: _onError = onError;