wiflutter 0.0.6 copy "wiflutter: ^0.0.6" to clipboard
wiflutter: ^0.0.6 copied to clipboard

Control Wi-Fi in Flutter like a boss. Take the reins of connectivity for Android and iOS with swagger – connect, disconnect, and snag SSIDs effortlessly. Your Wi-Fi, your rules – boss mode activated!

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:wiflutter/enums/enterprise_certificate_enum.dart';
import 'package:wiflutter/wiflutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _wiFlutterPlugin = WiFlutter();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                  onPressed: () async {
                    await _wiFlutterPlugin.connect(
                      ssid: 'Diablo_III',
                      password: 'st0x1_0xf_j0rdan',
                      enterpriseCertificate: EnterpriseCertificateEnum.WPA2_PSK,
                      withInternet: false,
                      timeoutInSeconds: 40,
                    );
                  },
                  child: const Text("Connect")),
              ElevatedButton(
                  onPressed: () async {
                    await _wiFlutterPlugin.disconnect();
                  },
                  child: const Text("Disconnect")),
            ],
          ),
        ),
      ),
    );
  }
}
8
likes
140
pub points
68%
popularity

Publisher

unverified uploader

Control Wi-Fi in Flutter like a boss. Take the reins of connectivity for Android and iOS with swagger – connect, disconnect, and snag SSIDs effortlessly. Your Wi-Fi, your rules – boss mode activated!

Homepage
Repository (GitHub)
View/report issues

Topics

#wifi #iot

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on wiflutter