LCOV - code coverage report
Current view: top level - lib/src/utils/web_worker - native_implementations_web_worker_stub.dart (source / functions) Coverage Total Hit
Test: merged.info Lines: 0.0 % 6 0
Test Date: 2025-01-14 13:39:53 Functions: - 0 0

            Line data    Source code
       1              : import 'dart:async';
       2              : 
       3              : import 'package:matrix/matrix.dart';
       4              : 
       5              : class NativeImplementationsWebWorker extends NativeImplementations {
       6              :   /// the default handler for stackTraces in web workers
       7            0 :   static StackTrace defaultStackTraceHandler(String obfuscatedStackTrace) {
       8            0 :     return StackTrace.fromString(obfuscatedStackTrace);
       9              :   }
      10              : 
      11            0 :   NativeImplementationsWebWorker(
      12              :     Uri href, {
      13              :     Duration timeout = const Duration(seconds: 30),
      14              :     WebWorkerStackTraceCallback onStackTrace = defaultStackTraceHandler,
      15              :   });
      16              : }
      17              : 
      18              : class WebWorkerError extends Error {
      19              :   /// the error thrown in the web worker. Usually a [String]
      20              :   final Object? error;
      21              : 
      22              :   /// de-serialized [StackTrace]
      23              :   @override
      24              :   final StackTrace stackTrace;
      25              : 
      26            0 :   WebWorkerError({required this.error, required this.stackTrace});
      27              : 
      28            0 :   @override
      29              :   String toString() {
      30            0 :     return '$error, $stackTrace';
      31              :   }
      32              : }
      33              : 
      34              : /// converts a stringifyed, obfuscated [StackTrace] into a [StackTrace]
      35              : typedef WebWorkerStackTraceCallback = FutureOr<StackTrace> Function(
      36              :   String obfuscatedStackTrace,
      37              : );
        

Generated by: LCOV version 2.0-1