CountrySelector class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CountrySelector
Constructors
-
CountrySelector({required ValueChanged<
Country> onCountrySelected, required bool isBottomSheet, ScrollController? scrollController, ScrollPhysics? scrollPhysics, bool addFavouriteSeparator = true, bool showCountryCode = false, String? noResultMessage, List<IsoCode> favoriteCountries = const [], List<IsoCode> ? countries, bool showSearchInput = true, TextStyle? countryCodeStyle, TextStyle? countryNameStyle, InputDecoration? searchInputDecoration, TextStyle? searchInputTextStyle, Color? defaultSearchInputIconColor, Color? bottomSheetDragHandlerColor, double flagSize = 48, BoxShape flagShape = BoxShape.circle, bool showCountryName = true, bool showCountryFlag = true, double? searchInputHeight, double? searchInputWidth, Key? key}) -
const
Properties
- addFavouriteSeparator → bool
-
Whether to add a list divider between favorites & defaults
countries.
final
- bottomSheetDragHandlerColor → Color?
-
The Color of the divider at the top on the bottom sheet
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
- countryCodeStyle → TextStyle?
-
The TextStyle of the country subtitle
final
- countryNameStyle → TextStyle?
-
The TextStyle of the country title
final
- defaultSearchInputIconColor → Color?
-
The Color of the Search Icon in the Search Box
final
-
favoriteCountries
→ List<
IsoCode> -
Determine the countries to be displayed on top of the list
Check addFavouriteSeparator property to enable/disable adding a
list divider between favorites and others defaults countries
final
- flagShape → BoxShape
-
Determines if the displayed flags should be circular.
final
- flagSize → double
-
The size factor for displaying flags within the UI.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBottomSheet → bool
-
Determines if the component is being used within a bottom sheet.
For display bottomSheetDragHandler and some paddings
final
- 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
- searchInputDecoration → InputDecoration?
-
The InputDecoration of the Search Box
final
- searchInputHeight → double?
-
The height of the search input field, if specified.
final
- searchInputTextStyle → TextStyle?
-
The TextStyle of the Search Box
final
- searchInputWidth → double?
-
The width of the search input field, if specified.
final
- showCountryCode → bool
-
Whether to show the country country code (ie: +1 / +33 /...)
as a listTile subtitle
final
- showCountryFlag → bool
-
Determines if the country flag should be shown
final
- showCountryName → bool
-
Determines if the country name should be shown.
final
- showSearchInput → bool
-
Whether to show the search input
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, 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