WiFiFlutter
WiFiFlutter copied to clipboard
[HELP] Making multiple requests in AP + STA mode
Hey there, I have an iot device whis is used as access point, Im connection to the iot device with the code bellow and I need to make multiple requests to confirm some credentials, but after making one request my wifi network switches from iot AP to my home network.
Tested on Android
Is there a way to prevent switching back to home network?
Future<bool> handleDeviceConnection(ConnectionInfoDto connectionInfoDto) async {
final response = await WiFiForIoTPlugin.connect(
connectionInfoDto.ssid.trim(),
joinOnce: true,
withInternet: false,
);
if (!response) {
return false;
}
return await WiFiForIoTPlugin.forceWifiUsage(true);
}