LCOV - code coverage report

Current view
top level - src - service_installer.dart
Test
lcov.info
Date
2025-03-26
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines22100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'dart:async';
2
3import 'worker/worker.dart';
4
5/// Extend this class or implement this interface in your worker service if it needs
6/// to take action when the worker thread is started or stopped.
7mixin ServiceInstaller {
8 /// Squadron will call this method as part of the worker thread initialization.
9 /// It will be called just after the service instance has been constructed. The
10 /// future returned by [Worker.start] will not complete before this method completes
11 /// whether synchronously or asynchronously. If this method throws, the future
12 /// returned by [Worker.start] will complete with an error and the service will not
13 /// be available.
142 FutureOr<void> install() {}
15
16 /// Squadron will call this method as part of the worker thread shutdown process.
17 /// It will be called just before effectively closing the platform channel. If
18 /// this method throws, the exception will not bubble up to the parent thread.
19 /// Also, [Worker.stop] does not wait for this method to complete.
202 FutureOr<void> uninstall() {}
21}
Choose Features