Open Shresthj opened 2 months ago
import 'package:wifi_for_iot/wifi_for_iot.dart';
Future
void main() { String ssid = 'CELIUMWIFI'; String password = 'CELIUMPASS';
_connectToWifi(ssid, password); }
@RishuRanjan25 where did you get this from- import 'package:wifi_for_iot/wifi_for_iot.dart';
code: Future
try {
var details = await WiFiForIoTPlugin.connect(ssid,
password: password, security: NetworkSecurity.WPA, joinOnce: true);
print('details are $details');
} catch (e) {
print('fialed to connect $e');
}
}. getting'details are false' in debug console
here my code-
-------------------------------------------------------------------------
ssid = 'CELIUMWIFI' password = 'CELIUMPASS' Future _connectToWifi(ssid, pass) async {
try {
var detail = await WiFiForIoTPlugin.connect(ssid,
password: pass, security: NetworkSecurity.WPA);
print(detail);
} catch (e) {
print("Error connecting to WiFi: $e");
}
}
when i am try to connect with new ssid and password i am getting this type of error-
-------------------------------------------------------------------------
I/FA (31756): Application backgrounded at: timestamp_millis: 1714717238789 D/ConnectivityManager(31756): NetworkCallback was already unregistered I/flutter (31756): false