city_picker 0.1.4

Flutter Android iOS web

china city picker, Simple and easy to use. A method to pick city.

city_picker #

pub package

A city picker of china, 中国城市选择器

screenshot #

图片

use #

pubspec.yaml

latest_version: pub package

city_picker: $latest_version

import

import 'package:city_picker/city_picker.dart';

use

    CityResult result = await showCityPicker(context);
    String province = result?.province; // 省
    String city = result?.city; // 市
    String county = result?.county; // 地级市/县

init pick city

    CityResult result = await showCityPicker(context,
     initCity: CityResult()
       ..province = p1 // 省
       ..city = p2 // 市
       ..county = p3); // 地级市/县

城市数据 #

使用 json,数据来源为 python 爬虫爬取python_get_city_datas

真实数据来源国家统计局城乡划分 2018 版

LICENSE #

copyright apache 2.0 for caijinglong

1
likes
85
pub points
62%
popularity

Publisher

kikt.top

china city picker, Simple and easy to use. A method to pick city.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on city_picker