• 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/scripting_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 run scripts in the Duit UI system.
6
/// Classes that mix in this delegate
7
/// should provide concrete implementations for
8
/// handling script execution, evaluation, and initialization.
9
mixin ScriptingCapabilityDelegate implements DriverRefHolder {
10
  @override
×
11
  @mustBeOverridden
12
  void linkDriver(UIDriver driver) =>
13
      throw const MissingCapabilityMethodImplementation(
14
        "linkDriver",
15
        "ScriptingCapabilityDelegate",
16
      );
17

18
  /// Eval script source code
19
  @mustBeOverridden
×
20
  Future<void> evalScript(String source) =>
21
      throw const MissingCapabilityMethodImplementation(
22
        "evalScript",
23
        "ScriptingCapabilityDelegate",
24
      );
25

26
  ///Based on the name of the function, starts its execution.
27
  ///
28
  ///Accepts additional parameters [url], [meta], [body],
29
  ///necessary for working with the transport object,
30
  ///as well as for passing data to the executing script
31
  @mustBeOverridden
×
32
  Future<Map<String, dynamic>?> execScript(
33
    String functionName, {
34
    String? url,
35
    Map<String, dynamic>? meta,
36
    Map<String, dynamic>? body,
37
  }) =>
38
      throw const MissingCapabilityMethodImplementation(
39
        "execScript",
40
        "ScriptingCapabilityDelegate",
41
      );
42

43
  /// Initializes the scripting capability.
44
  @mustBeOverridden
×
45
  Future<void> initScriptingCapability() =>
46
      throw const MissingCapabilityMethodImplementation(
47
        "initScriptingCapability",
48
        "ScriptingCapabilityDelegate",
49
      );
50

51
  /// Called to clean up any external resources, subscriptions, or handlers
52
  /// typically when a delegate is being disposed of or detached. Implementations
53
  /// should ensure all open streams or event sources are closed.
54
  ///
55
  /// This method must be overridden by implementers.
56
  ///
57
  /// Throws [MissingCapabilityMethodImplementation] by default.
NEW
58
  @mustBeOverridden
×
59
  void releaseResources() => throw const MissingCapabilityMethodImplementation(
60
        "releaseResources",
61
        "ScriptingCapabilityDelegate",
62
      );
63
}
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