CountryCodePicker class

Inheritance

Constructors

CountryCodePicker({ValueChanged<CountryCode>? onChanged, ValueChanged<CountryCode?>? onInit, String? initialSelection, List<String> favorite = const [], TextStyle? textStyle, EdgeInsetsGeometry padding = const EdgeInsets.all(8.0), bool showCountryOnly = false, InputDecoration searchDecoration = const InputDecoration(), TextStyle? searchStyle, TextStyle? dialogTextStyle, WidgetBuilder? emptySearchBuilder, bool showOnlyCountryWhenClosed = false, bool alignLeft = false, bool showFlag = true, bool? showFlagDialog, bool hideMainText = false, bool? showFlagMain, Decoration? flagDecoration, dynamic builder(CountryCode?)?, double flagWidth = 32.0, bool enabled = true, TextOverflow textOverflow = TextOverflow.ellipsis, Color? barrierColor, Color? backgroundColor, BoxDecoration? boxDecoration, Comparator<CountryCode>? comparator, List<String>? countryFilter, bool hideSearch = false, bool showDropDownButton = false, Size? dialogSize, Color? dialogBackgroundColor, Icon closeIcon = const Icon(Icons.close), List<Map<String, String>> countryList = codes, Key? key})

Properties

alignLeft bool
aligns the flag and the Text left
final
backgroundColor Color?
Background color of ModalBottomSheet
final
barrierColor Color?
Barrier color of ModalBottomSheet
final
boxDecoration BoxDecoration?
BoxDecoration for dialog
final
builder → dynamic Function(CountryCode?)?
final
closeIcon Icon
final
comparator Comparator<CountryCode>?
Use this property to change the order of the options
final
countryFilter List<String>?
used to customize the country list
final
countryList List<Map<String, String>>
An optional argument for injecting a list of countries with customized codes.
final
dialogBackgroundColor Color?
Background color of selection dialog
final
dialogSize Size?
the size of the selection dialog
final
dialogTextStyle TextStyle?
final
emptySearchBuilder WidgetBuilder?
final
enabled bool
final
favorite List<String>
final
flagDecoration Decoration?
BoxDecoration for the flag image
final
flagWidth double
Width of the flag images
final
hashCode int
The hash code for this object.
no setterinherited
hideMainText bool
final
hideSearch bool
Set to true if you want to hide the search part
final
initialSelection String?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<CountryCode>?
final
onInit ValueChanged<CountryCode?>?
final
padding EdgeInsetsGeometry
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchDecoration InputDecoration
final
searchStyle TextStyle?
final
showCountryOnly bool
final
showDropDownButton bool
Set to true if you want to show drop down button
final
showFlag bool
shows the flag
final
showFlagDialog bool?
final
showFlagMain bool?
final
showOnlyCountryWhenClosed bool
shows the name of the country instead of the dialcode
final
textOverflow TextOverflow
final
textStyle TextStyle?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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