this is china area selector.
In your flutter project add the dependency:
dependencies:
...
city_pickers:^0.0.1
For help getting started with Flutter, view the online documentation.
Import city_pickers.dart
import 'package:city_pickers/city_pickers.dart';
Demo code to show selector
Result result = await CityPickers.showCityPicker(
context: context,
);
Name | Type | Desc |
---|---|---|
showCityPicker | Function | the handle show selector |
showFullPageCityPicker | Function | the handle show full screen selector |
Name | Type | Default | Desc |
---|---|---|---|
context | BuildContext | null | context |
theme | ThemeData | Theme.of(context) | theme |
locationCode | String | 110000 | initial location |
height | double | 300 | container height |
showType | ShowType | ShowType.pca | selector show type |
barrierOpacity | double | 0.5 | pop modal opacity |
barrierDismissible | bool | true | dismiss this route by tapping the modal barrier |
Name | Type | Default | Desc |
---|---|---|---|
context | BuildContext | null | context |
theme | ThemeData | Theme.of(context) | theme |
locationCode | String | 110000 | initial location |
showType | ShowType | ShowType.pca | selector show type |
The data information comes from National Bureau of Statistics
This project's example code and style, reference withFlutter Go, flutter go help developers get started quickly Flutter