ShareUtils class

Name: 分享工具类 基于 share_plus Created by Fitem on 2023/6/28

Constructors

ShareUtils()

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

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 Methods

shareFile({required String name, String? path, Uint8List? bytes, String? text, String? subject}) Future<bool>
分享文件 pathbytes 二选一,不符合则抛出 FormatException 异常 name文件名称 path文件路径 bytes文件字节 text分享内容 subject分享主题
shareFiles(List<ShareFile> files, {String? text, String? subject}) Future<bool>
分享多个文件 files文件列表 text分享内容 subject分享主题
shareImage({required String name, String? path, Uint8List? bytes, String? text, String? subject}) Future<bool>
分享图片 pathbytes 二选一,不符合则抛出 FormatException 异常 name图片名称 path图片路径 bytes图片字节 text分享内容 subject分享主题
shareImages(List<ShareFile> images, {String? text, String? subject}) Future<bool>
分享多张图片 images图片列表 text分享内容 subject分享主题
shareText(String text, {String? subject}) Future<bool>
分享文本 text分享内容 subject分享主题