initialize method

  1. @override
Future<void> initialize(
  1. QuickActionHandler handler
)
override

Initializes this plugin.

Call this once before any further interaction with the plugin.

Implementation

@override
Future<void> initialize(QuickActionHandler handler) async {
  channel.setMethodCallHandler((MethodCall call) async {
    assert(call.method == 'launch');
    handler(call.arguments as String);
  });
  final String? action =
      await channel.invokeMethod<String?>('getLaunchAction');
  if (action != null) {
    handler(action);
  }
}