NationCodePicker class
final
Constructors
NationCodePicker ({Key ? key , required NationCodes defaultNationCode , NationCodes ? primaryNationCode , void onNationSelected (NationCodes )?, bool hideSearch = false , bool hideFlag = false , bool hideDialCode = false , String ? title , Locale ? locale , TextStyle ? dialCodeTextStyle , double ? flagScale = 0.5 , TextStyle ? searchBarTextStyle , TextStyle ? searchBarPlaceholderStyle })
Creates a NationCodePicker widget.
Properties
defaultNationCode
→ NationCodes
The default NationCodes to be selected when the picker is first shown.
final
dialCodeTextStyle
→ TextStyle ?
The text style for the dial code.
If provided, used to style the dial text.
Defaults to the system style if not provided.
final
flagScale
→ double ?
The scale of the flag image.
Must be between 0.1 and 1.0 (inclusive).
0.5 corresponds to size 15, 0.1 to smaller size, and 1.0 to larger size.
If not provided, defaults to 0.5.
final
hashCode
→ int
The hash code for this object.
no setter inherited
hideDialCode
→ bool
Whether to hide the dial code of the selected nation.
Defaults to false, meaning the dial code is shown.
final
hideFlag
→ bool
Whether to hide the flag representing the selected nation.
Defaults to false, meaning the flag is shown.
final
hideSearch
→ bool
Whether the textfield that provides the search feature is hidden or not.
Defaults to false, meaning the search bar is shown.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
locale
→ Locale ?
The locale to be used for displaying the nation names.
If not provided, default nation names are shown.
final
onNationSelected
→ void Function(NationCodes ) ?
Callback function that is called when a nation code is selected.
If null, no action is taken when a nation is selected.
final
primaryNationCode
→ NationCodes ?
The NationCodes that will be displayed at the top of the picker list.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
searchBarPlaceholderStyle
→ TextStyle ?
The text style for the search bar placeholder.
If provided, used to style the search bar placeholder text.
Defaults to the system style if not provided.
final
searchBarTextStyle
→ TextStyle ?
The text style for the search bar.
If provided, used to style the search bar text.
Defaults to the system style if not provided.
final
title
→ String ?
The title of the picker dialog.
If not provided, is not used.
final