run method

Future<Map<String, dynamic>> run(
  1. String identifier, [
  2. Map<String, Object?> params = const {},
  3. bool executionScope = true
])

Runs the intent identifier with params and returns the handler's result map.

By default opens an execution scope the way the generated Android bridge does for every call: the params carry an _executionId, so AppIntentExecution.current is non-null inside the handler. Pass executionScope: false for the iOS shape of an intent that is neither long-running, cancellable nor requests a value, where current is null.

Completes with AppIntentError carrying the code the native side would see, or with AppIntentsSchemaViolation when params do not match the declared schema.

Implementation

Future<Map<String, dynamic>> run(
  String identifier, [
  Map<String, Object?> params = const {},
  bool executionScope = true,
]) => start(identifier, params, executionScope).result;