LCOV - code coverage report

Current view
top level - src/annotations - squadron_service.dart
Test
lcov.info
Date
2024-11-13
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines1616.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();
5
6/// Annotation for service classes to be wrapped as workers.
7class SquadronService {
80 const SquadronService({
9 this.pool = true,
10 this.targetPlatform = TargetPlatform.all,
11 String? baseUrl,
12 }) : baseUrl = baseUrl ?? '',
13 local = false;
14
150 const SquadronService.web({bool pool = true, String? baseUrl})
160 : this(pool: pool, targetPlatform: TargetPlatform.web, baseUrl: baseUrl);
17
180 const SquadronService.vm({bool pool = true})
190 : this(pool: pool, targetPlatform: TargetPlatform.vm);
20
2111 const SquadronService.local()
22 : pool = false,
23 local = true,
24 targetPlatform = TargetPlatform.all,
25 baseUrl = '';
26
27 /// Controls code generation of a [WorkerPool] exposing the target service class.
28 /// `true` by default.
29 final bool pool;
30
31 /// Controls code generation of a [LocalWorkerClient] exposing the target service class.
32 /// `false` by default.
33 final bool local;
34
35 /// Controls code generation of a entry points for various platforms.
36 final int targetPlatform;
37
38 /// For Web-based workers, indicates the [baseUrl] where the Web Worker will
39 /// be exposed in production.
40 final String baseUrl;
41}
Choose Features