postal_code_jp 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new50

postal_code_jp #

A dart package for Japan Post official postal code, a.k.a zip code, search and update.

Inspired by rinkei/jipcode.

Installation #

1. Depend on it #

dependencies:
  postal_code_jp: ^1.0.0

2. Install it #

with pub:

$ pub get

with Flutter:

$ flutter pub get

3. Import it #

import 'package:postal_code_jp/postal_code_jp.dart';

Usage #

await PostalCodeJp.locate('1600022');
// => [{'postal_code': '1600022', 'prefecture': '東京都', 'city': '新宿区', 'town': '新宿'}]

Update #

日本郵便の郵便番号データを毎月アップデートします (予定)

最新のデータを利用したい場合は、パッケージのバージョンをアップデートしてください。

update package

Contributing #

  1. Fork it
  2. Create your feature branch (git checkout -b new_feature_branch)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin new_feature_branch)
  5. Create new Pull Request

[1.0.0]

  • initial release.

example/main.dart

import 'package:postal_code_jp/postal_code_jp.dart';

main() async {
  var address = await PostalCodeJp.locate('1600022');
  print(address);

  var addressAndPrefectureCode =
      await PostalCodeJp.locate('1600022', opt: {'prefecture_code': true});
  print(addressAndPrefectureCode);
}

Use this package as a library

1. Depend on it

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


dependencies:
  postal_code_jp: ^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:postal_code_jp/postal_code_jp.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 Nov 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

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

Health issues and suggestions

Document public APIs. (-1 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
archive ^2.0.10 2.0.11
csv ^4.0.3 4.0.3
intl ^0.16.0 0.16.0
yaml ^2.2.0 2.2.0
Transitive dependencies
args 1.5.2
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
meta 1.1.8
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.9.3