dart_smsbao 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 42

短信宝SDK Dart版本 #

安装依赖 #

dart_smsbao: ^1.0.1

使用方法 #

import 'package:dart_smsbao/dart_smsbao.dart';

void main() async {
    // 创建实例
    String user = "注册账号";
    String password = "登录密码";
    SmsBao sms = SmsBao(user, password);

    // 发送短信
    String phone = "手机号码";
    String content = "短信内容";
    Map<String, String> result = await sms.send_code(phone, content);
    print(result);
}

1.0.0 #

  • 初版本上线

1.0.1 #

  • 更新说明文档

example/main.dart

import 'package:dart_smsbao/dart_smsbao.dart';

void main() async {
    // 创建实例
    String user = "账号";
    String password = "密码";
    SmsBao sms = SmsBao(user, password);

    // 发送短信
    String phone = "手机号";
    String content = "短信内容";
    Map<String, String> result = await sms.send_code(phone, content);
    print(result);
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_smsbao: ^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:dart_smsbao/dart_smsbao.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
42
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:dart_smsbao/dart_smsbao.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:dart_smsbao/dart_smsbao.dart that imports:
  • dart:io

Health issues and suggestions

Document public APIs. (-1 points)

6 out of 6 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.

Format lib/dart_smsbao.dart.

Run dartfmt to format lib/dart_smsbao.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/singingplayer/dart_smsbao was unreachable.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
crypto ^2.1.4 2.1.5
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nnbd
convert 2.1.1
typed_data 1.2.0 1.3.0-nnbd
Dev dependencies
test ^1.5.1