showCountrySelectorDialog method
Future<Country?>
showCountrySelectorDialog({
- required BuildContext inheritedContext,
- required List<
Map< countries,String, dynamic> >
Implementation
Future<Country?> showCountrySelectorDialog(
{required BuildContext inheritedContext,
required List<Map<String, dynamic>> countries}) {
return showDialog(
context: inheritedContext,
barrierDismissible: false,
builder: (BuildContext context) => AlertDialog(
content: Directionality(
textDirection: Directionality.of(inheritedContext),
child: GetBuilder<PhoneInputController>(builder: (logic) {
return SizedBox(
width: double.maxFinite,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
child: TextFormField(
decoration: inputDecoration,
autofocus: autoFocus,
onChanged: (value) => logic.filterCountryMethod(value),
),
),
showCountryWithSearch(logic),
],
),
);
}),
),
),
);
}