getWifiListFromDevice method
Initiates a scan for available Wi-Fi networks.
This method sets the provided callback to be called with the list
of available Wi-Fi networks once the scan is complete. It then sends
a request to retrieve the Wi-Fi list using a JSON payload.
Parameters:
callback: A WiFiListCallback function that will be invoked with the results of the Wi-Fi scan. This callback allows the user to handle the retrieved Wi-Fi network information.
Note: Ensure that the callback is properly implemented to handle the Wi-Fi list data. This method does not return any value.
Implementation
void getWifiListFromDevice(WiFiListCallback callback) async {
_wifiListCallback = callback;
writeData(_buildGetWiFiListJson());
}