Bot releases are visible (Hide)
Published by Daniel-Ioannou over 3 years ago
Published by Daniel-Ioannou over 3 years ago
showCountryPicker(
context: context,
countryListTheme: CountryListThemeData(
// Optional. Sets the border radius for the bottomsheet.
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40.0),
topRight: Radius.circular(40.0),
),
// Optional. Styles the search field.
inputDecoration: InputDecoration(
labelText: 'Search',
hintText: 'Start typing to search',
prefixIcon: const Icon(Icons.search),
border: OutlineInputBorder(
borderSide: BorderSide(
color: const Color(0xFF8C98A8).withOpacity(0.2),
),
),
),
),
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
Published by Daniel-Ioannou over 3 years ago
CountryParser
Published by Daniel-Ioannou over 3 years ago
onClosed
callbackPublished by Daniel-Ioannou over 3 years ago
Published by Daniel-Ioannou over 3 years ago
showCountryPicker(
context: context,
countryListTheme: CountryListThemeData(
flagSize: 25,
backgroundColor: Colors.white,
textStyle: TextStyle(fontSize: 16, color: Colors.blueGrey),
),
onSelect: (Country country) {
print('Select country: ${country.displayName}');
},
);
Published by Daniel-Ioannou over 3 years ago
Published by Daniel-Ioannou over 3 years ago
showPhoneCode
is false remove duplicates countryPublished by Daniel-Ioannou almost 4 years ago
Published by Daniel-Ioannou about 4 years ago
showCountryPicker(
context: context,
countryFilter: <String>['AT', 'GB', 'DK', 'DE', 'FR', 'GR'], //It takes a list of country code(iso2).
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
Published by Daniel-Ioannou about 4 years ago
Published by Daniel-Ioannou about 4 years ago
Add the CountryLocalizations.delegate
in the list of your app delegates.
MaterialApp(
supportedLocales: [
const Locale('en'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // Generic Simplified Chinese 'zh_Hans'
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), // Generic traditional Chinese 'zh_Hant'
],
localizationsDelegates: [
CountryLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
home: HomePage(),
);
Published by Daniel-Ioannou about 4 years ago
Published by Daniel-Ioannou about 4 years ago
Published by Daniel-Ioannou about 4 years ago
Published by Daniel-Ioannou about 4 years ago
showCountryPicker(
context: context,
exclude: <String>['KN', 'MF'], //It takes a list of country code(iso2).
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
Published by Daniel-Ioannou about 4 years ago
Published by Daniel-Ioannou about 4 years ago