You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
720 B
29 lines
720 B
import 'dart:async'; |
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
class Min { |
|
static const MethodChannel _channel = const MethodChannel('min'); |
|
|
|
static Future<bool> initialize() async { |
|
final bool isInit = await _channel.invokeMethod('initialize'); |
|
return isInit; |
|
} |
|
|
|
static startMin(appid, token) async { |
|
_channel.invokeMethod('startMin', <String, dynamic>{ |
|
"appid":appid, |
|
"token":token |
|
}); |
|
} |
|
|
|
static Future<bool> reloadWgt(appid, wgtPath) async { |
|
final bool isReload = await _channel.invokeMethod( |
|
'reloadWgt', <String, dynamic>{"appid": appid, "wgtPath": wgtPath}); |
|
return isReload; |
|
} |
|
|
|
static clickListener() { |
|
_channel.invokeMethod('clickListener'); |
|
} |
|
}
|
|
|