CkShare class

Cross-platform share utility.

On web/HTML platforms, file-based sharing is omitted to prevent path_provider compile/runtime crashes, fallback to sharing text and URL. On native platforms (Android, iOS, macOS, Windows, Linux), it writes the image to a temporary file and uses the native OS share sheet.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

byteContent({required String title, required ByteData imageUrl, required String deepLinkUrl}) Future<void>
Shares binary byte image content along with title and deep link.
content({required String title, required String imageUrl, required String deepLinkUrl}) Future<void>
Shares remote image content by downloading it first, along with title and deep link.
getShareableSource(ByteData bytes) Future<String>
Prepares image bytes for sharing and returns a platform-safe string (file path on native, blob URL/data URI on web).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance CkShare
final