MethodChannelExtensionBridge class
The ExtensionBridgePlatform used on Android, iOS and macOS.
Everything goes through a single MethodChannel. Streams (links and
feature events) are multiplexed over it: Dart asks native code to start a
stream with an id, and native code calls back with events tagged with that
id. This lets features expose any number of streams without registering an
EventChannel for each of them.
- Inheritance
-
- Object
- PlatformInterface
- ExtensionBridgePlatform
- MethodChannelExtensionBridge
Constructors
- MethodChannelExtensionBridge({@visibleForTesting MethodChannel channel = const MethodChannel(channelName)})
- Creates a MethodChannelExtensionBridge.
Properties
Methods
-
clearValues(
String? appGroup) → Future< void> -
Removes every stored value.
override
-
featureEvents(
String feature, String stream, Object? arguments) → Stream< Object?> -
Listens to the
streamof the native feature registered underfeature.override -
getAllValues(
String? appGroup) → Future< Map< String, Object> > -
Reads every stored value.
override
-
getFilesDirectory(
String? appGroup) → Future< String?> -
The absolute path of the directory shared with app extensions.
override
-
getInitialLink(
) → Future< String?> -
The extension link that launched the app, if any.
override
-
getValue(
String? appGroup, String key) → Future< Object?> -
Reads the value stored under
key, ornullif there is none.override -
invokeFeature(
String feature, String method, Object? arguments) → Future< Object?> -
Calls
methodon the native feature registered underfeature.override -
isBackgroundExecutionSupported(
) → Future< bool> -
Whether native code can run Dart in the background on this platform.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerBackgroundCallback(
{required int dispatcherHandle, required int callbackHandle}) → Future< void> -
Persists the raw callback handles used to start a background isolate.
override
-
removeValue(
String? appGroup, String key) → Future< void> -
Removes the value stored under
key.override -
setValue(
String? appGroup, String key, Object value) → Future< void> -
Stores
valueunderkey, replacing any previous value.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- channelName → const String
- The name of the method channel shared with the native plugins.