Dead simple WiFi connect functionality for flutter.

Overview

Flutter WiFi Connect

Easily connect to a specified WiFi AP programmatically, using this plugin.

import 'package:wifi_connect/wifi_connect.dart';
WifiConnect.connect(context, 'ssid', 'password');

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');

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();
  }
}
Comments
  • [How To] Scan for available networks?

    [How To] Scan for available networks?

    Hello, First of all, I couldn't find this package on pub.dev so please let me know dependency to be added in pubspec.yaml file. Also, as I am new to Flutter, I could not able to understand how to Scan nearby SSIDs (Get a list) and then connect to one of them as per the user input.

    A simple code snippet for scanning WiFi networks would be great! Also Do I need to add permissions explicitly in AndroidManifest.xml file to get access of WIFI and Location services?

    opened by pranjal-joshi 1
  • Fix fetching of Wifi SSID on IOS 13, Fix connection to Wifi with hidden SSID on Android

    Fix fetching of Wifi SSID on IOS 13, Fix connection to Wifi with hidden SSID on Android

    This adds Location permission for IOS , which is necessary to fetch Wifi SSID on iOS 13 and above. This fixes connect with Wifi with hidden SSID on Android.

    opened by TahaAli07 0
  • Doesn't work for android 10+

    Doesn't work for android 10+

    The current android implementation doesn't work for Android SDK version >= 29. Form SDK 29 you need to you connectivityManager.requestNetwork in order to connect wifi network WiFiManager.addNetwork will always fail and return -1

    opened by Bersh 1
  • Updated  dependencies

    Updated dependencies

    Hi! I have updated dependencies versions and also migrated android project to use androidx. This is aimed to fix issues like this: https://github.com/scientifichackers/flutter-wifi-connect/issues/1

    Please let me know what do you think

    opened by Bersh 2
  • Compatibility with version

    Compatibility with version

    Hi, I try to use your component but I got this error:

    `FAILURE: Build failed with an exception.

    • What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: project ':use_location' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 7s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)`

    Will you update versions reference soon?

    opened by jvegaperez 2
Owner
Scientific Hackers
Dedicated hackers that live by the scientific method
Scientific Hackers
Rajagiri connect is a networking platform that enables the students of Rajagiri to form a social network among themselves, enabling them to connect with their seniors, juniors and faculty for sharing of information and resources.

Rajagiri Connect Rajagiri connect is a networking platform that enables the students of Rajagiri to form a social network among themselves, enabling t

Muhammad Amaan 2 Nov 27, 2022
WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

WooSignal 314 Jan 9, 2023
🙌🏾 This package makes it easy to use the Mono connect widget in a flutter project

Flutter Mono ** This is an unofficial SDK for flutter This package makes it easy to use the Mono connect widget in a flutter project. ?? Screen Shots

Chiziaruhoma Ogbonda 12 Dec 20, 2022
A project made for the ECV Digital 2022. 🌐 The goal being to make a Flutter application to connect, register and display information of a given API.👨🏼🔧

not_netflix A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

QUENEL Laurent 2 May 7, 2022
Create flutter project with all needed configuration in two minutes (theme, localization, connect to firebase, FCM, local notifications, safe API call, error handling, animation..etc)

Flutter GetX Template Flutter Getx template to make starting project fast and easy . Introduction We all face the same problem when we want to start a

Emad Beltaje 150 Jan 7, 2023
Connect your flutter app to firebase, use firebase's Authentication. Don't mind my poor UI. 😬

flutter_email_auth A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Syed Muhammad Ahmad 2 May 2, 2022
Freela is a Flutter project that aims to connect people who want to work with jobs to be done.

Freela Freela is a Flutter project being developed at the university that aims to connect people who want to work with jobs to be done. Para Desenvolv

Gustavo Martins 4 Nov 1, 2022
A blogging application where users can publish their blogs and articles and can connect with other authors, developed using Flutter and Firebase.

Utopia About the app A blogging application where users can publish their blogs and articles and can connect with other authors, developed using Flutt

Utopia 12 Jan 3, 2023
This is a university marketplace, where students buy and sell products and services online or offline. Mainly to connect the two parties together.

marktorder A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Ibukunoluwa Naphtali 1 Jan 10, 2022
Luis Ciber 3 Jan 11, 2022
POS plugging to connect with each type of pos device.

flutter_pos_printer A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized packag

Harshit sharma 3 Aug 25, 2022
Connect with people travelling to the airport or railway to share a cab.

Campus OLA ?? People often try to search for others who are also leaving for airport/railway station from IITG campus during vacations, trips etc beca

Students' Web Committee 5 Nov 15, 2022
Excess Food Locator helps food providers connect with food distributing NGOs.

Excess Food Locator Excess Food Locator helps people having excess food connect with other resources and distributors. This application is based on a

Pranav Kale 6 Nov 6, 2022
Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to tidily bound separated logic into complex solution.

Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to

Roman Hornak 23 Feb 23, 2022
Allows send emails from flutter using native platform functionality.

flutter_email_sender Allows send emails from flutter using native platform functionality. In android it opens default mail app via intent. In iOS MFMa

Tautvydas Šidlauskas 107 Jan 3, 2023
A TextField flutter package with tagging functionality.

Flutter Tagging A flutter package with tagging or multi-select functionality. Useful for adding Tag or Label Selection Forms. List<Language> _selected

Sarbagya Dhaubanjar 149 Sep 6, 2022
Contactus - a flutter package. The most common functionality added in any commercial app is the Developer's contact details

Contact Us The most common functionality added in any commercial app is the Developer's contact details!! So this package helps the developers to simp

Abhishek Doshi 19 Aug 4, 2022
Peek & Pop implementation for Flutter based on the iOS functionality of the same name.

peek_and_pop Peek & Pop implementation for Flutter based on the iOS functionality of the same name. Finally, the v1.0.0 release! More fluent, more opt

AliYigitBireroglu 227 Dec 17, 2022
Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed

Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed, i.e. after the first frame has been displayed. Maintainer: @slightfoot

Flutter Community 432 Jan 3, 2023