https://github.com/scientifichackers/flutter-wifi-connect
Dead simple WiFi connect functionality for flutter.
https://github.com/scientifichackers/flutter-wifi-connect
Last synced: 8 months ago
JSON representation
Dead simple WiFi connect functionality for flutter.
- Host: GitHub
- URL: https://github.com/scientifichackers/flutter-wifi-connect
- Owner: scientifichackers
- License: other
- Created: 2019-12-10T21:45:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T14:54:08.000Z (almost 6 years ago)
- Last Synced: 2025-04-06T17:04:43.183Z (about 1 year ago)
- Language: Kotlin
- Size: 95.7 KB
- Stars: 24
- Watchers: 2
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter WiFi Connect
Easily connect to a specified WiFi AP programmatically, using this plugin.
```dart
import 'package:wifi_connect/wifi_connect.dart';
```
```dart
WifiConnect.connect(context, 'ssid', 'password');
```
It's that simple. No fussing with permissions, enabling WiFi, location and all that boring stuff.
---
```dart
var connectedTo = WifiConnect.getConnectedSSID(context);
print('Connected to: $connectedTo');
```
---
And behold, the mighty `WifiScannerMixin`!
```dart
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State with WifiScannerMixin {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Text("Connected to '$connectedSSID'"),
)
)
);
}
@override
void initState() {
super.initState();
startWifiScanner();
}
}
```