/flutter_jd_address_selector

京东地址选择器

Primary LanguageDartOtherNOASSERTION

flutter_jd_address_selector

仿京东地址选择器

Use

pubspec.yaml

    dependencies:
      flutter_jd_address_selector:
        git:
          url: https://github.com/shichunlei/flutter_jd_address_selector

import

    import 'package:flutter_jd_address_selector/flutter_jd_address_selector.dart';

use

    void _choiceAddressDialog() async {
      showModalBottomSheet(
        context: context,
        builder: (BuildContext context) {
          return JDAddressDialog(
              onSelected: (province, city, county) {
                address = '$province-$city-$county';
                setState(() {});
              },
              title: '选择地址',
              selectedColor: Colors.red,
              unselectedColor: Colors.black);
        });
    }

运行截图

1 2

城市数据

数据来源国家统计局城乡划分 2019 版

LICENSE

copyright apache 2.0 for shichunlei