LCOV - code coverage report

Current view
top level - src/annotations - squadron_service.dart
Test
lcov.info
Date
2025-03-26
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines6785.7%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import '../pool/worker_pool.dart';
2import 'target_platform.dart';
3
4const localService = SquadronService.local();
5const vmService = SquadronService.vm();
6const localWorker = LocalWorkerParam._();
7
8class LocalWorkerParam {
912 const LocalWorkerParam._();
10}
11
12/// Annotation for service classes to be wrapped as workers.
13class SquadronService {
1413 const SquadronService({
15 this.pool = true,
16 this.targetPlatform = TargetPlatform.all,
17 String? baseUrl,
18 }) : baseUrl = baseUrl ?? '',
19 local = false;
20
211 const SquadronService.web({bool pool = true, String? baseUrl})
221 : this(pool: pool, targetPlatform: TargetPlatform.web, baseUrl: baseUrl);
23
2412 const SquadronService.vm({bool pool = true})
250 : this(pool: pool, targetPlatform: TargetPlatform.vm);
26
2712 const SquadronService.local()
28 : pool = false,
29 local = true,
30 targetPlatform = TargetPlatform.none,
31 baseUrl = '';
32
33 /// Controls code generation of a [WorkerPool] exposing the target service
34 /// class. `true` by default.
35 final bool pool;
36
37 /// Controls code generation of a [LocalWorkerClient] exposing the target
38 /// service class. `false` by default.
39 final bool local;
40
41 /// Controls code generation of a entry points for various platforms.
42 final int targetPlatform;
43
44 /// For Web-based workers, indicates the [baseUrl] where the Web Worker will
45 /// be exposed in production.
46 final String baseUrl;
47}
Choose Features