city_picker_china 0.1.0 copy "city_picker_china: ^0.1.0" to clipboard
city_picker_china: ^0.1.0 copied to clipboard

Flutter china city picker, use the dataset from baidu map updated on 202104.

Flutter 中国城市地区选择器 #

数据源: 百度地图行政区划adcode映射表 【更新至21年04月】

比起国家统计局的数据优点在于

  • 数据比较新
  • 一定存在第三级地区
  • 有港澳台数据

使用实例 #


void showCityPicker() {

  /// basic
  showModalBottomSheet<CityResult>(context: context, builder: (_) => const CityPicker());

  /// with code
  showModalBottomSheet<CityResult>(context: context, builder: (_) => const CityPicker.fromCode(code: code));

  /// with city name
  showModalBottomSheet<CityResult>(
      context: context, builder: (_) => const CityPicker.formName(province: province, city: city, county: county));
}

home

picker

12
likes
150
points
52
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter china city picker, use the dataset from baidu map updated on 202104.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

collection, flutter

More

Packages that depend on city_picker_china