subscribeTo method

  1. @protected
Future<void> subscribeTo(
  1. Id id,
  2. WinEvent event
)

Asks the plugin to call _handleMethod whenever id + event happens.

Effectively, this means that events will per default not clog up the MethodChannel.

Implementation

@protected
Future<void> subscribeTo(Id id, WinEvent event) async {
  await _channel.invokeMethod("subscribeTo", {
    "id": id,
    "event": event.code,
  });
}