components/u_text_field library

Classes

UCountryFlag
Flag image of a country (bundled with u). UCountryFlag(country: UCountries.iran())
UDropDownField<T>
Drop-down in text-field style, with validator. UDropDownField<int>(initialValue: 1, items: const [DropdownMenuItem(value: 1, child: Text("One"))], onChanged: (v) {})
UPhoneNumberData
What UTextFieldPhoneNumber reports: full number, number without code and the country's details.
UTextField
Text field with label, validator, clear button, password eye, formatters and u's layout options. UTextField(labelText: "Email", validator: UValidators.email(), keyboardType: TextInputType.emailAddress)
UTextFieldAutoComplete<T>
Field that suggests from a local list as you type. UTextFieldAutoComplete<City>(items: cities, labelBuilder: (c) => c.name, selectedItem: city, onChanged: (c) => city = c)
UTextFieldAutoCompleteAsync<T>
Field that searches your API as you type (debounced). UTextFieldAutoCompleteAsync<User>(fetchData: api.searchUsers, labelBuilder: (u) => u.name, selectedItem: null, onChanged: (u) {})
UTextFieldAutoCompleteAsyncMulti<T>
Async search field that collects several picks as removable chips. UTextFieldAutoCompleteAsyncMulti<Tag>(selected: tags, fetchData: api.searchTags, labelBuilder: (t) => t.title)
UTextFieldDatePicker
Read-only field that opens a Gregorian or Jalali date (and time) picker on tap. UTextFieldDatePicker(jalali: true, labelText: "Birth date", onChange: (d) => birth = d)
UTextFieldPhoneNumber
Phone field with country picker, flag, per-country validation and formatting. UTextFieldPhoneNumber(onChanged: (p) => phone = p.phoneNumber)

Enums

UCountryPickerMode
How UTextFieldPhoneNumber opens its country list.