MethodChannelShareHandler class
An implementation of ShareHandlerPlatform
that uses a MethodChannel
to communicate with the native code.
The share_handler
plugin code
itself never talks to the native code directly.
It delegates all calls to an instance of a class
that extends the ShareHandlerPlatform.
The architecture above allows for platforms that communicate differently with the native side (like web) to have a common interface to extend.
This is the instance that runs when the native side talks to your Flutter app through MethodChannels (Android and iOS platforms).
- Inheritance
-
- Object
- PlatformInterface
- ShareHandlerPlatform
- MethodChannelShareHandler
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Stream that can be listened to for shared media when the app is already running.
no setteroverride
Methods
-
Returns the initially stored shared media for single time use on app boot. Use media stream to receive shares while app is active.
NOTE. (iOS only) file attachments are copied to a temp folder and should be deleted after using them.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordSentMessage(
{required String conversationIdentifier, required String conversationName, String? conversationImageFilePath, String? serviceName}) → Future< void> -
Records a sent message so the share menu can suggest recipients/conversations to share to.
override
-
Resets the initial shared media to null to prevent duplicate handling.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- eventChannel → const EventChannel