English | 正體中文

coverage

Map zip code to cities in Taiwan.

Supported formats

This package only supports three-digits zip codes, which are last updated in October 2021.

Features

  • Get all the zip codes in Taiwan
  • Get all the cities in Taiwan
  • Find the district of a zip code
  • Find the three-digits zip code of a district
  • Find the districts of a city

Example

  // Static functions can be used without an instance.
  // `TaiwanZip.toDistrict` finds the district
  var zipCode = '100';
  print('$zipCode refers to ${TaiwanZip.toDistrict(zipCode)}');
  // `TaiwanZip.toZip` finds the zip code
  var district = '臺北市中正區';
  print('$district uses ${TaiwanZip.toZip(district)} as its zip code');
  // `TaiwanZip.getDistricts` returns all the districts in the city
  var city = '臺北市';
  print('Districts in $city include ${TaiwanZip.getDistricts(city)}');

Libraries

taiwan_zip