补充注释

master
kangxuyao 2022-01-17 15:19:11 +08:00
parent 8843c246a5
commit ff469d9032
1 changed files with 30 additions and 7 deletions

View File

@ -82,8 +82,10 @@ class UIConfig {
//iOS
//H5 0xFFFFAA00
int? progressBarColor;
//true
bool autoAdaptDarkMode = true;
//appletText
String? appletText;
@ -421,6 +423,10 @@ class Mop {
return await _channel.invokeMapMethod("scanOpenApplet", params);
}
///
///
/// [qrcode]
///
Future qrcodeOpenApplet(String qrcode) async {
Map<String, Object> params = {'qrcode': qrcode};
return await _channel.invokeMapMethod("qrcodeOpenApplet", params);
@ -495,28 +501,36 @@ class Mop {
return;
}
//
///
///
///
Future<void> closeApplet(String appletId, bool animated) async {
await _channel.invokeMethod(
"closeApplet", {"appletId": appletId, "animated": animated});
return;
}
//
///
///
///
Future<void> finishRunningApplet(String appletId, bool animated) async {
await _channel.invokeMethod(
"finishRunningApplet", {"appletId": appletId, "animated": animated});
return;
}
//
///
///
///
Future setActivityTransitionAnim(Anim anim) async {
await _channel
.invokeMethod("setActivityTransitionAnim", {"anim": anim.name});
return;
}
//
///
///
/// [appId] id
/// [eventData]
Future<void> sendCustomEvent(
String appId, Map<String, dynamic> eventData) async {
await _channel.invokeMethod(
@ -524,7 +538,13 @@ class Mop {
return;
}
//js
///
/// webviewjs
/// [appId] id
/// [eventName]
/// [nativeViewId] webviewId
/// [eventData]
///
Future<void> callJS(String appId, String eventName, String nativeViewId,
Map<String, dynamic> eventData) async {
await _channel.invokeMethod("callJS", {
@ -536,7 +556,10 @@ class Mop {
return;
}
//h5
///
/// register webview extension api
/// webviewapi
///
void addWebExtentionApi(String name, ExtensionApiHandler handler) {
_webExtensionApis[name] = handler;
_channel.invokeMethod("addWebExtentionApi", {"name": name});