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 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); } } }