getWifiSsid method
Retrieves the SSID (Service Set Identifier) of the currently connected Wi-Fi network.
Returns the SSID as a String if successful, or null
if an error occurs.
Throws a PlatformException if there is an error invoking the native method.
Implementation
Future<String?> getWifiSsid() async {
try {
var res = await methodChannel.invokeMethod<String>('getWifiSsid');
return res;
} on PlatformException catch (e) {
_log(e);
return null;
}
}