You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App/lib/uitl/PlatformBridge.dart

30 lines
852 B
Dart

import 'package:flutter/services.dart';
class PlatformBridge {
static const platform = const MethodChannel("HMG-Platform-Bridge");
// Method Names
static const wifi_connect_method = "connectHMGGuestWifi";
static const show_loading_method = "loading";
Future<Object> connectHMGGuestWifi(String patientId) {
print("Invoking platform method: $wifi_connect_method");
try {
return platform.invokeMethod(wifi_connect_method, [patientId]);
} on PlatformException catch (e) {
print(e);
return Future.error(e);
}
}
void showLoading(String message, bool show) async {
print("Invoking platform method: $show_loading_method");
try {
final int result =
await platform.invokeMethod(show_loading_method, [message, show]);
} on PlatformException catch (e) {
print(e);
}
}
}