CountryCodePickerModal class
Widget that can be used on showing a modal as bottom sheet that contains all of the CountryCodes.
After pressing the CountryCode's ListTile, the widget pops and returns the selected CountryCode which can be manipulated.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CountryCodePickerModal
Constructors
-
CountryCodePickerModal({required bool localize, required Icon? favoritesIcon, required bool showSearchBar, required bool showDialCode, Widget? title, String? focusedCountry, InputDecoration? searchBarDecoration, List<
String> favorites = const [], List<String> filteredCountries = const [], TextStyle? countryTextStyle, TextStyle? dialCodeTextStyle, double? horizontalTitleGap, TextStyle? searchBarTextStyle, Key? key}) -
Widget that can be used on showing a modal as bottom sheet that
contains all of the CountryCodes.
const
Properties
- countryTextStyle → TextStyle?
-
Optional parameter to customize the text style of the country names.
final
- dialCodeTextStyle → TextStyle?
-
Optional parameter to customize the appearance of the country dial codes.
final
-
favorites
→ List<
String> -
Favorite CountryCodes that can be shown at the top of the list.
final
- favoritesIcon → Icon?
-
final
-
filteredCountries
→ List<
String> -
Filters all of the CountryCodes available and only show the codes that
are existing in this list.
final
- focusedCountry → String?
-
If not null, automatically scrolls the list view to this country.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalTitleGap → double?
-
space between flag and country name
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- localize → bool
-
An optional argument for localizing the country names based on
device's current selected Language (country/region).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBarDecoration → InputDecoration?
-
Can be used to customize the appearance of search bar.
final
- searchBarTextStyle → TextStyle?
-
Optional parameter to customize the appearance of the search bar.
final
- showDialCode → bool
-
An optional argument for showing dial code at country tiles.
final
- showSearchBar → bool
-
An optional argument for showing search bar.
final
- title → Widget?
-
Can be used to customize the title of the country code picker modal.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CountryCodePickerModal> -
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