wifluttings 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new58

wifluttings

Redirect your Flutter application to the Native WiFi Settings.

Version

Features

  • Open the Native Wifi Settings on:
    • Android
    • iOS

Preview

preview

Getting Started

First, you need add wifluttings in the dependencies list:

dependencies:
  wifluttings: 0.1.1

Then, you will need import the class:

import 'package:wifluttings/wifluttings.dart';

Finally, you could redirect your application to the Native WiFi Settings with:

Wifluttings.openNativeWifiSettings;

if you need check if the settings was opened, you could check the wifluttings response like:

bool settingsWasOpened = await Wifluttings.openNativeWifiSettings; 

0.0.1

  • open Wifi Native Settings from Flutter, Basic Functionality.

0.0.2

  • There is no changes in the functionality, just was refactored the README.md and applied the pub Suggestions

0.0.3

  • There is no changes in the functionality, just was changes in the example and the README.md

0.1.0

  • There is no changes in the functionality, just was increased the version to a stable version name.

0.1.0

  • There is no changes in the functionality, just was adjusted the version to a stable version name.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:wifluttings/wifluttings.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _wifiSettingsWasOpened = false;

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    bool wifiSettingsWasOpened;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      wifiSettingsWasOpened = await Wifluttings.openNativeWifiSettings;
    } on PlatformException {
      wifiSettingsWasOpened = false;
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _wifiSettingsWasOpened = wifiSettingsWasOpened;
    });
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Wifluttings example app'),
        ),
        body: SizedBox.expand(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              new Text('Wifi settings was Opened?: $_wifiSettingsWasOpened\n'),
              RaisedButton(
                child: Text("open wifi settings".toUpperCase(),),
                color: Colors.blue,
                textColor: Colors.white,
                elevation: 4.0,
                onPressed: this.initPlatformState,
              )
            ],
          )
        )
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  wifluttings: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:wifluttings/wifluttings.dart';
  
Version Uploaded Documentation Archive
0.1.1 Oct 4, 2018 Go to the documentation of wifluttings 0.1.1 Download wifluttings 0.1.1 archive
0.1.0 Oct 4, 2018 Go to the documentation of wifluttings 0.1.0 Download wifluttings 0.1.0 archive
0.0.2 Oct 4, 2018 Go to the documentation of wifluttings 0.0.2 Download wifluttings 0.0.2 archive
0.0.1 Oct 4, 2018 Go to the documentation of wifluttings 0.0.1 Download wifluttings 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
16
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4
  • Flutter: 0.9.5

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8