FlutterNativeHelper class

Properties

deviceName Future<String>
获取设备名称
no setter
hashCode int
The hash code for this object.
no setterinherited
platformVersion Future<String?>
获取平台版本号
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

callPhoneToShake({int? millSeconds, int? amplitude}) Future<void>
控制设备震动
cancelDownload(String cancelTag) Future<void>
取消下载
dispose() → void
销毁
downloadAndInstallApk({required String fileUrl, required String fileDirectory, required String fileName, bool isDeleteOriginalFile = true}) → void
下载并安装apk ~ 一条龙服务
downloadFile({required String fileUrl, required String fileDirectory, required String fileName, bool isDeleteOriginalFile = true}) Future<String>
下载文件到⚠️沙盒目录下(仅能下载到沙盒目录下)
getSystemRingtoneList(int systemRingtoneType) Future<List<SystemRingtoneModel>>
获取系统铃声/通知/警报列表
installApk(String filePath) Future<void>
安装apk,内部已处理 '允许应用内安装其他应用' 权限 filePath 要安装的apk绝对路径
intoAppSettingDetail() Future<bool>
进入应用设置详情页
isPlayingSystemRingtone() Future<bool>
系统铃声是否正在播放
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAppMarket({String targetMarketPackageName = "", bool isOpenSystemMarket = true}) Future<bool>
打开应用市场-当前应用页面
playSystemRingtone({String? assignUri}) Future<bool>
播放系统铃声/通知/警报,如为空则播放系统默认铃声
setMethodCallHandler(Future handler(MethodCall call)?) → void
监听 Native 端发送的信息
stopSystemRingtone() Future<bool>
暂停播放系统铃声/通知/警报
toString() String
A string representation of this object.
inherited
transformUriToRealPath(String? targetUri) Future<String>
将 Uri 转换为真实路径

Operators

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

Static Properties

instance FlutterNativeHelper
no setter