NationCodePicker class final

Inheritance

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 setterinherited
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.
finalinherited
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 setterinherited
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

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<NationCodePicker>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited