Coder Social home page Coder Social logo

daiki1003 / flutter_jp_prefecture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yhirano/flutter_jp_prefecture

0.0 1.0 0.0 12 KB

A library that converts Japanese prefecture codes and prefecture names.

Home Page: https://pub.dev/packages/jp_prefecture

License: MIT License

Dart 100.00%

flutter_jp_prefecture's Introduction

jp_prefecture

A library that converts Japanese prefecture codes and prefecture names.

Usage

Find a Japanese prefecture by prefecture code.

final pref = JpPrefecture.findByCode(13);
if (pref == null) {
  return;
}
print(pref.code); // => 13
print(pref.name); // => '東京都'
print(pref.nameE); // => 'Tokyo'
print(pref.nameH); // => 'とうきょうと'
print(pref.nameK); // => 'トウキョウト'
print(pref.area); // => '関東'
print(pref.type); // => '都'

Find a Japanese prefecture by prefecture name.

final pref = JpPrefecture.findByName('東京都');
if (pref == null) {
  return;
}
print(pref.code); // => 13
print(pref.name); // => '東京都'
print(pref.nameE); // => 'Tokyo'
print(pref.nameH); // => 'とうきょうと'
print(pref.nameK); // => 'トウキョウト'
print(pref.area); // => '関東'
print(pref.type); // => '都'

Get all Japanese prefectures.

final prefs = JpPrefecture.all;
print(prefs.first.code); // => 1
print(prefs.first.name); // => '北海道'
print(prefs.first.nameE); // => 'Hokkaido'
print(prefs.first.nameH); // => 'ほっかいどう'
print(prefs.first.nameK); // => 'ホッカイドウ'
print(prefs.first.area); // => '北海道'
print(prefs.first.type); // => '道'

flutter_jp_prefecture's People

Contributors

yhirano avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.