airkiss 1.0.1

dart-airkiss #

pub package

A dart wechat airkiss lib to config IOT device.

Usage #

To use this plugin, add airkiss as a dependency in your pubspec.yaml file.

dependencies:
  airkiss: ^1.0.0

Example #

import 'package:airkiss/airkiss.dart';


import 'package:airkiss/airkiss.dart';

void test(String ssid, String pwd) async {
  print('config ssid:$ssid, pwd:$pwd');
  AirkissConfig ac = AirkissConfig();
  var res = await ac.config(ssid, pwd);
  if (res != null) {
    print('result: $res');
  }
  else {
    print(
        'config failed!!! please ensure phone/pc connected to Wi—Fi[$ssid] with 2.4GHz Channel(NOT 5GHz Channel)');
  }
}

void main() {
  test("SSID", "PASSWORD");
}

View on GitHub

1.0.0 #

  • First useable version.

Use this package as a library

1. Depend on it

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


dependencies:
  airkiss: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:airkiss/airkiss.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
12
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

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

  • Dart: 2.5.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:airkiss/airkiss.dart with components: io.

Health issues and suggestions

Document public APIs. (-1 points)

43 out of 43 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/airkiss.dart. (-2.48 points)

Analysis of lib/airkiss.dart reported 5 hints:

line 60 col 9: DO use curly braces for all flow control structures.

line 96 col 62: Use = to separate a named parameter from its default value.

line 104 col 18: Use = to separate a named parameter from its default value.

line 155 col 5: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

line 164 col 15: Use isNotEmpty instead of length

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and airkiss.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0