CountryPickerBuilder class
Builder API for creating CountryPicker with a fluent interface
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accentColor(
Color? color) → CountryPickerBuilder - Set the accent color
-
adaptiveHeight(
bool adaptive) → CountryPickerBuilder - Set whether to use adaptive height
-
backgroundColor(
Color? color) → CountryPickerBuilder - Set the background color
-
borderRadius(
double? radius) → CountryPickerBuilder - Set the border radius
-
bottomSheetWidth(
double? width) → CountryPickerBuilder - Set max width for bottom sheet content.
-
build(
) → CountryPicker - Build the CountryPicker widget
-
countryFilter(
CountryFilter filter) → CountryPickerBuilder - Set a custom country filter applied to all data.
-
cursorColor(
Color? color) → CountryPickerBuilder - Set the cursor color
-
darkTheme(
) → CountryPickerBuilder - Set a custom theme (dark theme by default)
-
emptySearchBuilder(
CountryPickerEmptySearchBuilder builder) → CountryPickerBuilder - Customize empty state shown when search has no matches.
-
exclude(
List< String> exclude) → CountryPickerBuilder - Set country codes to exclude from picker and search.
-
favorites(
List< String> favorites) → CountryPickerBuilder - Set favorite country codes displayed before suggested and regular sections.
-
flagSize(
double? size) → CountryPickerBuilder - Set the flag size
-
headerColor(
Color? color) → CountryPickerBuilder - Set the header color
-
hintText(
String? text) → CountryPickerBuilder - Set the hint text
-
hintTextColor(
Color? color) → CountryPickerBuilder - Set the hint text color
-
hoverColor(
Color? color) → CountryPickerBuilder - Set the hover color
-
itemBuilder(
CountryPickerItemBuilder builder) → CountryPickerBuilder - Customize the rendering of country rows.
-
itemHeight(
double? height) → CountryPickerBuilder - Set the item height
-
itemPadding(
EdgeInsets? padding) → CountryPickerBuilder - Set the item padding
-
labelText(
String? text) → CountryPickerBuilder - Set the label text
-
lightTheme(
) → CountryPickerBuilder - Set a custom theme (light theme)
-
minimalTheme(
) → CountryPickerBuilder - Set a minimal theme (compact design)
-
modalHeaderBuilder(
CountryPickerModalHeaderBuilder builder) → CountryPickerBuilder - Customize modal header by wrapping or replacing the default header.
-
modalPresentation(
CountryPickerModalPresentation presentation) → CountryPickerBuilder - Set how the picker is presented (bottom sheet by default)
-
moveAlongWithKeyboard(
bool moveAlongWithKeyboard) → CountryPickerBuilder - Move modal content along with keyboard insets.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClosed(
VoidCallback callback) → CountryPickerBuilder - Called when the picker modal is closed.
-
onCountrySelected(
ValueChanged< Country> callback) → CountryPickerBuilder - Set the callback for country selection
-
onOpened(
VoidCallback callback) → CountryPickerBuilder - Called when the picker modal is opened.
-
onSearchChanged(
ValueChanged< String> callback) → CountryPickerBuilder - Called when search input changes.
-
purpleTheme(
) → CountryPickerBuilder - Set a purple theme
-
searchFieldBorderColor(
Color? color) → CountryPickerBuilder - Set the search field border color
-
searchFieldColor(
Color? color) → CountryPickerBuilder - Set the search field color
-
selectedCountry(
Country? country) → CountryPickerBuilder - Set the selected country
-
showCountryCodes(
bool show) → CountryPickerBuilder - Set whether to show country codes
-
showFlags(
bool show) → CountryPickerBuilder - Set whether to show flags
-
showPhoneCodes(
bool show) → CountryPickerBuilder - Set whether to show phone codes
-
showSuggestedCountries(
bool show) → CountryPickerBuilder - Set whether to show suggested countries based on locale
-
textColor(
Color? color) → CountryPickerBuilder - Set the text color
-
textStyle(
TextStyle? style) → CountryPickerBuilder - Set the text style
-
themeData(
CountryPickerThemeData themeData) → CountryPickerBuilder - Set all visual styling via a single theme object.
-
toString(
) → String -
A string representation of this object.
inherited
- Use root navigator for modal presentation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited