0 purchases
wifi connect
Flutter WiFi Connect #
Easily connect to a specified WiFi AP programmatically, using this plugin.
import 'package:wifi_connect/wifi_connect.dart';
copied to clipboard
WifiConnect.connect(context, 'ssid', 'password');
copied to clipboard
It's that simple. No fussing with permissions, enabling WiFi, location and all that boring stuff.
var connectedTo = WifiConnect.getConnectedSSID(context);
print('Connected to: $connectedTo');
copied to clipboard
And behold, the mighty WifiScannerMixin!
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> with WifiScannerMixin<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Text("Connected to '$connectedSSID'"),
)
)
);
}
@override
void initState() {
super.initState();
startWifiScanner();
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.