MethodChannelAppIntents class
An implementation of AppIntentsPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- AppIntentsPlatform
- MethodChannelAppIntents
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
-
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.
-
donateRelevantEntities(
String entityIdentifier, List< Map< entities, {String? context}) → Future<String, dynamic> >void> -
Donates a set of contextually relevant entities to the system (#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 -
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
NSUserActivityso Siri and Apple Intelligence can resolve references like "this" (#56).override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited