added stop smartconfig
This commit is contained in:
parent
0b035dc916
commit
97853d525e
@ -7,7 +7,25 @@ import 'dart:io' show Platform;
|
|||||||
// for iOS https://github.com/lou-lan/SmartConfig
|
// for iOS https://github.com/lou-lan/SmartConfig
|
||||||
|
|
||||||
class FlutterSmartconfig {
|
class FlutterSmartconfig {
|
||||||
static const platform = const MethodChannel("plugins.flutter.io/flutter_smartconfig");
|
static const platform =
|
||||||
|
const MethodChannel("plugins.flutter.io/flutter_smartconfig");
|
||||||
|
|
||||||
|
static Future<void> stopConfigure() async {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
try {
|
||||||
|
await platform.invokeMethod('stopSmartConfig');
|
||||||
|
} on PlatformException catch (e) {
|
||||||
|
return Future<Map<String, String>>(() {
|
||||||
|
throw new PlatformException(
|
||||||
|
code: "Failed to get connected WiFi name: '${e.message}'.");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return Future<Map<String, String>>(() {
|
||||||
|
throw new PlatformException(code: "only Android is supported");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Future<dynamic> configureEsp(
|
static Future<dynamic> configureEsp(
|
||||||
{String ssid, String bssid, String password}) async {
|
{String ssid, String bssid, String password}) async {
|
||||||
|
Loading…
Reference in New Issue
Block a user