MethodChannelAppIntents class

An implementation of AppIntentsPlatform that uses method channels.

Inheritance

Constructors

MethodChannelAppIntents()
Constructor that sets up the method call handler.

Properties

hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to interact with the native platform.
final
onIntentCancellation → Stream<IntentCancellation>
A stream of cancellations for running intent executions (#130).
no setteroverride
onIntentExecution → Stream<IntentExecutionRequest>
A stream of intent execution requests from the native platform.
no setteroverride
pendingActionsChannel → EventChannel
The event channel for receiving pending action notifications.
final
pendingActionsStream → Stream<String>
A stream of pending action notifications from native App Intents.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCachedValue(String key) → Future<void>
Clears a cached value from native storage.
override
clearOnscreenEntity() → Future<void>
Clears the onscreen entity association set by setOnscreenEntity (#56).
override
configureStorage({required String appGroupIdentifier, String? storageIdentifier}) → Future<void>
Configures shared storage for cross-process App Intents communication.
override
dispose() → void
Disposes the stream controller.
donateIntent(String identifier, Map<String, dynamic> params) → Future<void>
Donates an executed intent so Siri / Apple Intelligence can learn that the user performed this action in-app (#55).
override
donateRelevantEntities(String entityIdentifier, List<Map<String, dynamic>> entities, {String? context, RelevantEntitiesOperation operation = RelevantEntitiesOperation.update}) → Future<void>
Donates a set of contextually relevant entities to the system (#55).
override
donateRelevantIntents(List<RelevantIntentDonation> donations) → Future<void>
Donates the app's complete set of relevant widget intents (#55).
override
getCachedValue(String key) → Future
Retrieves a cached value from native storage.
override
getPlatformVersion() → Future<String?>
Returns the current platform version.
override
handleEntityQuery(String entityIdentifier, List<String> identifiers) → Future<List<Map<String, dynamic>>>
Queries entities using the registered handler.
handleIntentExecution(String identifier, Map<String, dynamic> params) → Future<Map<String, dynamic>>
Executes the registered handler for the given intent.
handleSuggestedEntitiesQuery(String entityIdentifier) → Future<List<Map<String, dynamic>>>
Gets suggested entities using the registered handler.
handleValueQuery(String entityIdentifier, Map<String, dynamic> input) → Future<List<Map<String, dynamic>>>
Runs the registered value query handler for the given entity type (#51).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processPendingActions() → Future<bool>
Checks for pending intent actions cached by native App Intents.
override
registerEntityQueryHandler(String entityIdentifier, EntityQueryHandler handler) → void
Registers a handler for querying entities by their identifiers.
override
registerIntentHandler(String identifier, IntentHandler handler) → void
Registers a handler for the specified intent.
override
registerSuggestedEntitiesHandler(String entityIdentifier, SuggestedEntitiesHandler handler) → void
Registers a handler for providing suggested/default entities.
override
registerValueQueryHandler(String entityIdentifier, ValueQueryHandler handler) → void
Registers a handler for an IntentValueQuery (#51).
override
reportIntentProgress(String executionId, int completed, int total) → Future<void>
Reports progress for a running long-running intent execution (#130).
override
requestIntentValue(String executionId, String parameter) → Future<Object?>
Asks the running intent to prompt the user for a parameter value (#131).
override
setCachedValue(String key, dynamic value) → Future<void>
Sets a cached value in native storage.
override
setOnscreenEntity(String entityIdentifier, String entityId, {String? title}) → Future<void>
Binds the entity currently shown on screen to an NSUserActivity so Siri and Apple Intelligence can resolve references like "this" (#56).
override
toString() → String
A string representation of this object.
inherited
updateAppShortcutParameters() → Future<void>
Refreshes the parameters of the app's App Shortcuts (#149).
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

unheardIntentExecutionLimit → const int
How many unheard requests are kept. An app that never listens to onIntentExecution would otherwise grow the buffer forever; the oldest are dropped first.