CountrySelector class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CountrySelector
Constructors
-
CountrySelector({Key? key, required ValueChanged<
Country> onCountrySelected, required FlagCache flagCache, ScrollController? scrollController, ScrollPhysics? scrollPhysics, bool addFavoritesSeparator = true, bool showCountryCode = false, String? noResultMessage, List<IsoCode> favoriteCountries = const [], List<IsoCode> ? countries, bool searchAutofocus = kIsWeb, TextStyle? subtitleStyle, TextStyle? titleStyle, InputDecoration? searchBoxDecoration, TextStyle? searchBoxTextStyle, Color? searchBoxIconColor, double flagSize = 40}) -
const
Properties
- addFavoritesSeparator → bool
-
Whether to add a list divider between favorites & defaults
countries.
final
-
countries
→ List<
IsoCode> ? -
List of countries to display in the selector
Value optional in constructor.
when omitted, the full country list is displayed
final
-
favoriteCountries
→ List<
IsoCode> -
Determine the countries to be displayed on top of the list
Check addFavoritesSeparator property to enable/disable adding a
list divider between favorites and others defaults countries
final
- flagCache → FlagCache
-
final
- flagSize → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- noResultMessage → String?
-
The message displayed instead of the list when the search has no results
final
-
onCountrySelected
→ ValueChanged<
Country> -
Callback triggered when user select a country
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
ListView.builder scroll controller (ie: ScrollView.controller)
final
- scrollPhysics → ScrollPhysics?
-
The ScrollPhysics of the Country List
final
- searchAutofocus → bool
-
whether the search input is auto focussed
final
- searchBoxDecoration → InputDecoration?
-
The InputDecoration of the Search Box
final
- searchBoxIconColor → Color?
-
The Color of the Search Icon in the Search Box
final
- searchBoxTextStyle → TextStyle?
-
The TextStyle of the Search Box
final
- showCountryCode → bool
-
Whether to show the country country code (ie: +1 / +33 /...)
as a listTile subtitle
final
- subtitleStyle → TextStyle?
-
The TextStyle of the country subtitle
final
- titleStyle → TextStyle?
-
The TextStyle of the country title
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → CountrySelectorState -
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