Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
PhoneNumberInput
const PhoneNumberInput({
super.key,
this.size,
required this.controller,
this.countryCode,
this.initialCountryCode = 'US',
this.countries,
this.onChanged,
this.onCountryChanged,
this.onSubmitted,
this.focusNode,
this.placeholder,
this.searchPlaceholder = 'Search country…',
this.emptySearchText = 'No countries found',
this.enabled = true,
this.readOnly = false,
this.isInvalid = false,
this.autofocus = false,
this.textInputAction = TextInputAction.next,
this.backgroundColor,
this.foregroundColor,
this.placeholderColor,
this.focusedBorderColor,
this.borderRadius,
this.height,
this.fontSize,
this.padding,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
size | ComponentSize? | No | null |
controller | TextEditingController | Yes | — |
countryCode | String? | No | null |
initialCountryCode | String | No | 'US' |
countries | List<PhoneCountry>? | No | null |
onChanged | ValueChanged<PhoneNumberValue>? | No | null |
onCountryChanged | ValueChanged<PhoneCountry>? | No | null |
onSubmitted | ValueChanged<PhoneNumberValue>? | No | null |
focusNode | FocusNode? | No | null |
placeholder | String? | No | null |
searchPlaceholder | String | No | 'Search country…' |
emptySearchText | String | No | 'No countries found' |
enabled | bool | No | true |
readOnly | bool | No | false |
isInvalid | bool | No | false |
autofocus | bool | No | false |
textInputAction | TextInputAction | No | TextInputAction.next |
backgroundColor | Color? | No | null |
foregroundColor | Color? | No | null |
placeholderColor | Color? | No | null |
focusedBorderColor | Color? | No | null |
borderRadius | double? | No | null |
height | double? | No | null |
fontSize | double? | No | null |
padding | EdgeInsetsGeometry? | No | null |
Application Setup
Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.
Source
lib/src/widgets/forms/phone_number_input/phone_number_input.dart
This reference is generated from the PhoneNumberInput declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

