Dead simple WiFi connect functionality for flutter.

Last update: May 19, 2022

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();
  }
}

GitHub

https://github.com/scientifichackers/flutter-wifi-connect
Comments
  • 1. [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?

    Reviewed by pranjal-joshi at 2020-07-28 17:11
  • 2. 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.

    Reviewed by TahaAli07 at 2020-07-11 15:35
  • 3. 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

    Reviewed by Bersh at 2020-10-04 10:16
  • 4. 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

    Reviewed by Bersh at 2020-09-17 11:49
  • 5. 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?

    Reviewed by jvegaperez at 2020-07-04 14:29

Related

πŸ™ŒπŸΎ This package makes it easy to use the Mono connect widget in a flutter project
πŸ™ŒπŸΎ 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

Feb 22, 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

May 7, 2022
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

Jan 10, 2022
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

Jan 24, 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 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

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

Apr 19, 2022
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

Apr 25, 2022
Contactus - a flutter package. The most common functionality added in any commercial app is the Developer's contact details
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

Apr 25, 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

May 15, 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

May 19, 2022
(Flutter)Minimal App With Offline Storage(Using HIVE) Functionality.
(Flutter)Minimal App With Offline Storage(Using HIVE) Functionality.

TaskZ (Minimal + Offline TODO List App) Minimal App With Offline Storage(Using HIVE) Functionality. Getting Started ?? Any suggestion, improvement on

Mar 24, 2022
This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two pages application with user bid in input and count down view.
This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality.  In addition to that, it's a two pages application with user bid in input and count down view.

Nilam This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two

May 23, 2022
Live News App Using Rest API with Searching Functionality
Live News App Using Rest API with Searching Functionality

News App Flutter A Simple News App built with Flutter. In this app, there is a Home page, which will display top news from newsapi.org. News categorie

May 16, 2022
Fwitter is an example application that demonstrates the features and functionality of Fauna.
Fwitter is an example application that demonstrates the features and functionality of Fauna.

A full introduction to this project can be found in the docs. This project is an example of how to build a 'real-world' app with highly dynamic data i

May 21, 2022
Dart package to support Wake-on-LAN functionality

wake_on_lan Dart library package to easily send Wake-on-LAN magic packets to devices on your local network. Getting Started wake_on_lan has three core

May 5, 2022
Searchhelperexample - SearchHelper - code wrapper for searching functionality
Searchhelperexample - SearchHelper - code wrapper for searching functionality

Overview SearchHelper is code wrapper for searching functionality developed by D

Apr 3, 2022
βš’οΈ A monorepo containing a collection of packages that provide useful functionality for building CLI applications in Dart.
βš’οΈ A monorepo containing a collection of packages that provide useful functionality for building CLI applications in Dart.

βš’οΈ Dart CLI Utilities A monorepo containing a collection of packages that provide useful functionality for building CLI applications in Dart. Document

May 1, 2022
A Todo app with full fledge functionality and Awesome Look and feel.

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

Apr 18, 2022