showPicker<T extends BaseItem> static method
void
showPicker<T extends BaseItem>(
- BuildContext context, {
- String? regionJson,
- List<
T> ? regionList, - ChangeData? selectProvince,
- ChangeData? selectCity,
- ChangeData? selectArea,
Implementation
static void showPicker<T extends BaseItem>(
BuildContext context, {
String? regionJson,
List<T>? regionList,
ChangeData? selectProvince,
ChangeData? selectCity,
ChangeData? selectArea,
}) {
List<T>? data;
if (regionJson != null) {
data = json.decode(regionJson);
} else {
data = regionList;
}
Navigator.push(
context,
_CityPickerRoute<T>(
data: data,
selectProvince: selectProvince,
selectCity: selectCity,
selectArea: selectArea,
theme: Theme.of(context),
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel),
);
}