LCOV - code coverage report
Current view: top level - src - task_id.dart Coverage Total Hit
Test: lcov.info Lines: 0.0 % 1 0
Test Date: 2026-04-30 18:23:23 Functions: - 0 0

            Line data    Source code
       1              : /// A compile-time–typed wrapper around a task ID string.
       2              : ///
       3              : /// Using `TaskId` instead of raw `String` makes accidental parameter swaps
       4              : /// (e.g. `taskId` vs `tag`) a compile error rather than a silent runtime bug.
       5              : ///
       6              : /// ```dart
       7              : /// const id = TaskId('daily-sync');
       8              : ///
       9              : /// await NativeWorkManager.cancel(taskId: id.value);
      10              : /// // or — because TaskId implements String, it works wherever String is accepted:
      11              : /// await NativeWorkManager.cancel(taskId: id);
      12              : /// ```
      13              : ///
      14              : /// `TaskId` is a Dart 3 *extension type* — it has zero runtime overhead and
      15              : /// erases to `String` at compile time.
      16              : extension type const TaskId(String value) implements String {
      17              :   /// Returns true if the raw value is non-empty.
      18            0 :   bool get isValid => value.isNotEmpty;
      19              : }
        

Generated by: LCOV version 2.4-0