show method

  1. @override
Future<IsoCode?> show(
  1. BuildContext context
)
override

Implementation

@override
Future<IsoCode?> show(
  BuildContext context,
) {
  IsoCode? selected;
  final ctrl = showBottomSheet(
    context: context,
    builder: (_) => MediaQuery(
      data: MediaQueryData.fromView(View.of(context)),
      child: SafeArea(
        child: _getCountrySelectorSheet(
          inputContext: context,
          onCountrySelected: (country) {
            selected = country;
            Navigator.pop(context, country);
          },
        ),
      ),
    ),
  );
  return ctrl.closed.then((_) => selected);
}