• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Duit-Foundation / duit_kernel / 20911371815

12 Jan 2026 07:31AM UTC coverage: 75.116% (-0.1%) from 75.211%
20911371815

push

github

lesleysin
chore: Prepare v4.2.0-rc.2

0 of 3 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

1781 of 2371 relevant lines covered (75.12%)

4.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/src/capabilities/native_module_capability.dart
1
import "package:duit_kernel/duit_kernel.dart";
2
import "package:duit_kernel/src/capabilities/driver_ref.dart";
3
import "package:meta/meta.dart";
4

5
/// A mixin that provides capabilities for managing and interacting with
6
/// native code in the Duit UI system. Classes that mix in this delegate should
7
/// provide concrete implementations for handling native module interactions,
8
/// such as invoking native methods and initializing the native module.
9
mixin NativeModuleCapabilityDelegate implements DriverRefHolder {
10
  @override
×
11
  @mustBeOverridden
12
  void linkDriver(UIDriver driver) =>
13
      throw const MissingCapabilityMethodImplementation(
14
        "linkDriver",
15
        "NativeModuleCapabilityDelegate",
16
      );
17

18
  /// Initializes the native module.
19
  ///
20
  /// This method must be overridden by implementers.
21
  ///
22
  /// Throws [MissingCapabilityMethodImplementation] if not overridden.
UNCOV
23
  @mustBeOverridden
×
24
  Future<void> initNativeModule() =>
25
      throw const MissingCapabilityMethodImplementation(
26
        "initNativeModule",
27
        "NativeModuleCapabilityDelegate",
28
      );
29

30
  /// Invokes a native method.
31
  ///
32
  /// The [method] parameter represents the name of the native method to invoke.
33
  /// The [arguments] parameter contains any additional data required for the method.
34
  ///
35
  /// This method must be overridden by implementers.
36
  ///
37
  /// Throws [MissingCapabilityMethodImplementation] if not overridden.
NEW
38
  @mustBeOverridden
×
39
  Future<T?> invokeNativeMethod<T>(
40
    String method, [
41
    arguments,
42
  ]) =>
43
      throw const MissingCapabilityMethodImplementation(
44
        "invokeNativeMethod",
45
        "NativeModuleCapabilityDelegate",
46
      );
47

48
  /// Called to clean up any external resources, subscriptions, or handlers
49
  /// typically when a delegate is being disposed of or detached. Implementations
50
  /// should ensure all open streams or event sources are closed.
51
  ///
52
  /// This method must be overridden by implementers.
53
  ///
54
  /// Throws [MissingCapabilityMethodImplementation] by default.
NEW
55
  @mustBeOverridden
×
56
  void releaseResources() => throw const MissingCapabilityMethodImplementation(
57
        "releaseResources",
58
        "NativeModuleCapabilityDelegate",
59
      );
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc