GithubHelp home page GithubHelp logo

flutter_city_picker's Introduction

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

flutter_city_picker's People

Contributors

caijinglong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter_city_picker's Issues

按钮适配

在安卓手机上Mate20 确定取消按钮会显示不全,..src/city_piceker.dart line126 你用了CupertinoButton 导致安卓手机显示按钮不全,换成MaterialButton就没问题了,建议区分一下手机系统

插件包安装失败,错误信息如下

The current Dart SDK version is 2.1.0-dev.3.1.flutter-760a9690c2.

Because myapp depends on city_picker >=0.1.1 which requires SDK version >=2.1.0 <3.0.0, version solving failed.

pub get failed (1)

切换城市问题

在切换市的时候,区域不会切换,但是数据是可以返回的
比如:
安徽省 淮北市跟铜陵市 区域显示不会切换
福建省 泉州市跟三明市 区域显示不会切换,
数据返回是正确的

关于数据来源问题

因为这个数据可能随时发生变化
如果有合适的可采集的数据来源可以联系我

我会抽空更新内置数据

city code

能否增加cityCode ,后台存储城市代码而不是城市名字

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.