Skip to main content

UIDriver

Abstract class representing the Duit driver interface.

UIDriver combines all capability delegates through mixins and provides a base interface for managing Duit presentations.

tip

For creating a driver, it's recommended to use XDriver, which provides a convenient public API.

Structure​

abstract class UIDriver
with
FocusCapabilityDelegate,
ServerActionExecutionCapabilityDelegate,
UIControllerCapabilityDelegate,
ViewModelCapabilityDelegate,
TransportCapabilityDelegate,
ScriptingCapabilityDelegate,
LoggingCapabilityDelegate,
NativeModuleCapabilityDelegate {

/// Initializes the driver.
Future<void> init();

/// Releases driver resources.
void dispose();

/// Flag indicating whether the driver is running in native module mode.
abstract bool isModule;
}

Capability Delegates​

UIDriver includes the following capability delegates:

DelegateDescription
FocusCapabilityDelegateUI element focus management
ServerActionExecutionCapabilityDelegateServer action execution and event handling
UIControllerCapabilityDelegateUI element controller management
ViewModelCapabilityDelegateView model management
TransportCapabilityDelegateTransport layer
ScriptingCapabilityDelegateScript execution
LoggingCapabilityDelegateLogging
NativeModuleCapabilityDelegateNative code interaction

Deprecated Properties​

The following properties are marked as deprecated and will be removed in the next major release:

  • source — driver source URL
  • transportOptions — transport options
  • transport — transport instance
  • scriptRunner — ScriptRunner instance
  • eventResolver — event resolver
  • actionExecutor — action executor
  • externalEventHandler — external event handler
  • driverChannel — native communication channel
  • logger — logger (use LoggingCapabilityDelegate)
  • build() — UI building method

See Also​

  • XDriver — public API for working with the driver
  • DuitViewHost — host widget for Duit presentation