dart_phone 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

手机号码归属地离线查询 Dart版本 #

下载数据 #

http://q9syw3px9.bkt.clouddn.com/phone.dat

使用方法 #

import 'phone.dart';

void main() {
  var p = Phone();
  print(p.find("xxx"));
}

参考 #

https://github.com/xluohome/phonedata

https://github.com/lovedboy/phone

https://github.com/xluohome/phonedata/blob/master/phone.dat

1.0.0 #

  • 初版本上线

example/main.dart

import 'package:dart_phone/phone.dart' show Phone;

void main() {
  var p = Phone(datFile: "../phone.dat");
  print(p.find("18957509123"));
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_phone: ^1.0.0

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_phone/phone.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]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:dart_phone/phone.dartdart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:dart_phone/phone.dartdart:io

Health issues and suggestions

Document public APIs. (-1 points)

23 out of 23 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/phone.dart.

Run dartfmt to format lib/phone.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.5.1