unified_fields 1.0.4+9
unified_fields: ^1.0.4+9 copied to clipboard
Unified Flutter form fields, phone input with country flags, pickers, Jalali/Gregorian date and time, Persian digits, and Form validate/save/reset.
1.0.4+8 #
Fixes #
- Picker search scroll gap — filtering a single-select picker no longer leaves a blank band above the first match. Search rebuilds the list from the top (and jumps to index 0); scroll-to-selected only runs when the query is empty. Also fixes
_scrollToTopincorrectly scheduling_scrollToSelectedwhen the list was not yet attached.
Features #
pickerSearchInputFormatters— optional theme / sheet formatters for picker search fields (single, multi, and async query sheets). Default is no formatters; each app opts in via [UnifiedInputThemeData] or per-sheetsearchInputFormattersif it needs limits (e.g. English-only).
1.0.4+7 #
Fixes #
- Orphan
FocusNodecrash — pick-only fields, picker sheets andUnifiedPickerFieldControllerno longer park focus on a throwawayFocusScope.of(context).requestFocus(FocusNode())before opening a sheet. That node stayed attached to the scope without an element, so it held primary focus with a null context: traversal that sorts byFocusNode.rectasserted with "Tried to get the bounds of a focus node that didn't have its context set yet", and until then Tab and every other shortcut was silently dropped. All sites now call the sharedunifiedUnfocusBeforeModal().
Improvements #
- Keyboard reachable pickers — single / multi / async / customizable pickers, date, time, duration and wheel fields keep a stable
FocusNode, render focused chrome, and open their sheet on Space / Enter (focus alone never opens it). Focus returns to the field after the sheet closes. - Picker sheet navigation — the sheet takes focus on open (the search field only when
searchAutoFocusis set, so phones keep their soft keyboard closed), ArrowUp / ArrowDown move the highlight, Enter picks the highlighted row, typing starts a search, and Escape still dismisses. - Number arrow step — ArrowUp / ArrowDown on a focused numeric field step by
stepwithinmin/maxandfractionDigits; arrows with Ctrl / Cmd / Alt / Shift are left to text editing.
1.0.4+5 #
Fixes #
- Date picker dismiss — closing/cancelling [UnifiedDateField]'s picker no longer clears the current value (only Confirm applies a change).
1.0.4+3 #
Fixes #
- Picker / read-only
height— state chrome layers (readOnly,focused,error, …) no longer override layout props from the field decoration. Picker fields are permanentlyreadOnly, so a themefieldDecorationSet.readOnlywith aheightused to ignore per-fieldUnifiedInputDecoration.height. UnifiedInputDecorationSet.merge— layers are deep-merged via [UnifiedInputDecoration.merge] instead of replacing the whole layer, so partial overlays keepheight/ ratios from beneath.
1.0.3+2 #
Fixes #
resolveUnifiedFieldLabelMode— field-levellabelInRow: truenow wins over a themelabelModeof column/floating, sorowLabelRatioapplies in apps whose theme is not row-first.
1.0.3+1 #
Features #
- Styled date & time pickers — creative picker UIs from the app brick are now available in
unified_fields:- Date:
monthGrid,dateStrip,verticalMonths,cascadeChips,heroCalendaron [UnifiedFieldsDatePickerStyle] (legacycalendar/wheelsunchanged with Jalali support). - Time:
rulerTape,arcSlider,digitPad,timelineRail,clockDialon [UnifiedFieldsTimePickerStyle] (legacydial/wheelsunchanged).
- Date:
- [UnifiedFieldsPickerTheme] — shared styling for styled pickers (colors, radii, action labels); resolves from [UnifiedInputDatePickerStyle] + [ThemeData] via [UnifiedFieldsPickerTheme.resolve].
- [UnifiedFieldsCalendarDayInfo] /
dayInfoBuilder— per-day price labels, event dots, and disabled days on styled date pickers. - Field wiring — [UnifiedDateField], [UnifiedDateRangeField], [UnifiedTimeOfDayField], form wrappers, and controllers accept
pickerStyle,pickerTheme,dayInfoBuilder(date), andpresets/includeNowPreset(time).
Fixes #
- Global
height— [UnifiedFieldLabelMode.floatingLabel] now respects [UnifiedInputFieldDefaults.height] (label-in-row / label-in-column already did). - Global
rowLabelRatio— date/time/duration/picker fields no longer pass an emptyrowLabelRatio/ explicitlabelInRow: falseinto [UnifiedBaseTextField], which could block theme defaults; all fields now use [UnifiedResolvedFieldChrome.optionalRowLabelRatio]. - Label-in-row ratio — [UnifiedBaseTextField] always uses the resolved decoration’s [UnifiedInputDecoration.effectiveRowLabelRatio].
Features #
- [UnifiedInputAdornmentStyle] — global prefix/suffix chrome: icon colors, slot sizes, padding, glyph size, gap between adornments. Set on [UnifiedInputThemeData.adornmentStyle], [UnifiedInputFieldDefaults], or per field via [UnifiedInputDecoration].
- [UnifiedNumericStepButtonStyle] — themed +/- button color, size, spacing, and background. Global via [UnifiedInputThemeData.numericStepButtonStyle]; per field via [UnifiedInputDecoration.numericStepButtonStyle] or [UnifiedNumberField.stepButtonStyle].
- Number field adornment order — [UnifiedNumericLeadingAdornmentOrder] and [UnifiedNumericTrailingAdornmentOrder] control whether custom prefix/suffix sit before or after step buttons.
- Prefix adornments — [UnifiedBaseTextField] now normalizes and tints leading icons the same way as suffixes; prefix/suffix padding is themeable (no longer hardcoded
8.0).
1.0.2 #
Maintenance release. Pubspec version is 1.0.2+1. No public API changes.
Internal #
- File rename —
unified_cutomizable_picker_fields.dart→unified_customizable_picker_fields.dart(fixes the historical cutomizable typo). Import the package barrel (package:unified_fields/unified_fields.dart) as before; only directsrc/path imports (unsupported) are affected. unified_form_more_fields.dartsplit — the 3300-line form-wrappers file is now a small library withpartfiles grouped by domain (multi picker, date, time/duration, async pickers, number, async query). Public API and exports are unchanged.UnifiedColorstrimmed — removed ~100 app-specific legacy tokens (aviation seat/passenger accents, brand pinks,brownGrey1‑7,veryLightPink1‑7, gradients, …) that nothing in the package or known consumers referenced. The core semantic tokens (text, hint, borders, error, primary, scaffold,mainGreen,fieldTextFor/fieldLabelFor) remain.
1.0.1 #
Patch release. Pubspec version is 1.0.1+3.
Features #
UnifiedAsyncQueryMultiPicker/UnifiedFormAsyncQueryMultiPicker— like [UnifiedAsyncQueryPicker] but multi-select: remote search at the bottom of the sheet, temp selection list (toggle rows across searches), Cancel / Confirm. [UnifiedAsyncQueryMultiPickerFieldController], [showUnifiedAsyncQueryMultiPickerSheet], [AsyncQueryMultiPickerSheetWidget].
API #
- Async query controllers — [queryFetcher] is required on the widget only ([UnifiedAsyncQueryPicker], [UnifiedAsyncQueryMultiPicker], form wrappers). Controllers receive it via [bindAsyncQueryPicker] when the field mounts; [UnifiedAsyncQueryPickerFieldController] and [UnifiedAsyncQueryMultiPickerFieldController] no longer take
queryFetcherin the constructor.
Fixes #
- Async query picker sheets — search field moved below the sheet title (same as other pickers) so it is not hidden behind the keyboard; applies to single and multi async query sheets.
Fixes #
- Tests — restore
flutter_testindev_dependencies(was commented out, breakingflutter testandflutter pub getfor contributors). - Vendored scrollable list — [UnboundedViewport] passes
ScrollCacheExtent.pixelsto the [Viewport] super constructor on current Flutter; [UnboundedCustomScrollView] keepscacheExtent(const constructor) with an analyzer ignore for the deprecation.
Docs / lint #
- Dartdoc on async query picker / multi-picker public members; remove unnecessary imports in async query picker sources; exclude vendored
scrollable_listfrom analyzer (FluttercacheExtentdeprecations).
1.0.0 #
First stable release. The public API from 0.2.x is unchanged; this version marks production readiness and rolls up bug fixes from 0.2.7 and 0.2.8. Pubspec version is 1.0.0+1 (build metadata +1 for consumers that track build numbers).
Features #
UnifiedAsyncQueryPicker/UnifiedFormAsyncQueryPicker— read-only field; tap opens a sheet with an auto-focused search field at the bottom. Shows Start typing to fetch until [queryThreshold] (default 3) characters are entered, then calls [queryFetcher] with debounce and cancels stale requests when the user keeps typing. Results appear in a list; tap to select. [UnifiedAsyncQueryPickerFieldController], [showUnifiedAsyncQueryPickerSheet], [UnifiedAsyncQueryFetcher].
Fixes (included from 0.2.7 / 0.2.8) #
- Customizable form pickers — [UnifiedFormCustomizablePickerField] and multi/async variants clear the form error when the value becomes valid (
unifiedFormClearErrorIfValidon controller updates). [CustomizableSinglePickerController] / [CustomizableMultiPickerController] revalidate onapplyTyped/applySelected. Formvalidator:syncs to the controller for [UnifiedFieldValidation.validateFields] (syncCustomizableSingleFormValidatorToFieldController/syncCustomizableMultiFormValidatorToFieldController). UnifiedNumberField/UnifiedNumericStepField— [UnifiedFieldsTypography.usePersianDigitsGlobally] localizes displayed digits on init, while typing, and from [UnifiedNumberFieldController]; input formatters accept Persian digits; themetextStylePersianapplies via [UnifiedInputThemeResolver.fieldTextStyle]. Helpers:formatUnifiedNumberFieldText,localizeUnifiedNumberDisplayText.UnifiedDateField/UnifiedDateRangeField/UnifiedDurationField— no longer read [UnifiedInputThemeScope] duringinitStatewhen resolvingdateFormatStyle/durationFormatStyle(fixesdependOnInheritedWidgetOfExactTypewas called before initState completed).- Typed form validators (0.2.7) —
FormFieldValidator<List<T>>, nullable pickers, andUnifiedFieldValidation.validateFieldsstay aligned withFormState.validate. - Field height on focus — [UnifiedBaseTextField] label-in-row layout uses a fixed row height; Material outline borders no longer thicken on focus, so enabled vs focused states keep the same height by default. [UnifiedInputDecoration.height] is optional (unset layers no longer force
56during merge).
Docs #
- README: Upgrading to 1.0.0, async query picker, Persian digits on number fields, customizable picker validation, consistent field height. Example README updated.
0.2.8 #
Fixes #
- Customizable form pickers — [UnifiedFormCustomizablePickerField], multi/async variants call [unifiedFormClearErrorIfValid] when the picker controller changes; [CustomizableSinglePickerController] / [CustomizableMultiPickerController] revalidate on
applyTyped/applySelected. Formvalidator:syncs to the controller for [UnifiedFieldValidation.validateFields]. UnifiedNumberField/UnifiedNumericStepField— respect [UnifiedFieldsTypography.usePersianDigitsGlobally]: display text is localized on init, while typing, and from [UnifiedNumberFieldController]; input formatters accept Persian digits; themetextStylePersianapplies via [UnifiedInputThemeResolver.fieldTextStyle].UnifiedDateField/UnifiedDateRangeField/UnifiedDurationField— complete fix fordependOnInheritedWidgetOfExactType<UnifiedInputThemeScope>() was called before initState() completedwhen themedateFormatStyle/durationFormatStyleis set. Format styles are cached indidChangeDependencieson all three widgets;initStateuses field-only resolution until dependencies are available.
Docs #
- README and example README version 0.2.8. Publish checklist updated.
0.2.7 #
Features #
UnifiedFieldsDateFormatStyle/UnifiedFieldsDurationFormatStyle— theme defaults on [UnifiedInputThemeData] (dateFormatStyle,durationFormatStyle) for Gregorian and Shamsi field display; override per [UnifiedDateField], [UnifiedDateRangeField], [UnifiedDurationField], form wrappers, and controllers. Presets:UnifiedFieldsDateFormatStyle.standard,isoGregorianDay. LegacyvalueFormat: DateFormat(…)still wins for dates when set. Resolvers: [UnifiedInputThemeResolver.dateFormatStyle] /durationFormatStyle.
Fixes #
UnifiedDateField/ range /UnifiedDurationField— resolvedateFormatStyle/durationFormatStylefrom theme indidChangeDependenciesonly (not duringinitState), fixingdependOnInheritedWidgetOfExactTypewas called before initState completed.- Typed form validators —
unifiedFormClearErrorIfValid,syncUnifiedFieldValue,syncFormFieldFromExternalValue, andsyncWidgetFormValidatorToFieldControllerpreserveT/T?/List<T>through form fields and controllers.FormFieldValidator<List<T>>(e.g.notEmptyList<CoffeeFlavor>) and nullable pickers no longer throw runtime subtype errors when the value changes. Public typedef: [UnifiedFieldValueValidator]. - Form vs controller validation — [UnifiedFormDateRangeField], [UnifiedFormTimeOfDayField], [UnifiedFormDurationField], and [UnifiedFormNumberField] sync
validator:ontofieldController. Non-form date/time/duration/number fields map display-string validators onto typed controllers (syncDisplayStringValidatorToFieldController,syncNumberDisplayValidatorToFieldController). Form pickers skip string-validator sync whenvalidationOverrideMessageis set.
Docs #
- README: Upgrading to 0.2.7 (format styles, validation). Example README updated.
0.2.6 #
Features #
UnifiedInputDatePickerStyle— theme and per-field styling for date picker sheets: sheet background, title/header, weekday row, day grid (normal, selected, today, disabled, in-range), month jump grid, year list, Gregorian/Shamsi toggle, confirm/cancel buttons,cellHeight,dayCircleSize, and nestedwheelStyle. Set on [UnifiedInputThemeData.datePickerStyle] ordatePickerStyleon [UnifiedDateField], [UnifiedDateRangeField], [UnifiedFormDateField], [UnifiedDateFieldController], and [showUnifiedFieldsDatePicker] / [showUnifiedFieldsDatePickerRange].UnifiedInputDatePickerStyle.shamsiTextStyle— optional [TextStyle] merged into picker labels when the active calendar is Shamsi (Jalali), viacalendarTextStyle(same role astextStylePersianfor field text).UnifiedInputDatePickerStyle.yearStripStyle— [UnifiedFieldsDateYearStripStyle]: horizontal year stripfadeColor,showFade,fadeExtent,magnification, chip sizing (defaults align withwheelStylewhen omitted).CustomWheelPicker— multi-column wheel field withcolumns/valuemaps keyed by index ({0: List<…>, 1: List<…>}→{0: v0, 1: v1}). [CustomWheelPickerColumn.typed] per column type, [CustomWheelPickerWheelLayout.vertical] (side-by-side vertical wheels) or.horizontal, [UnifiedFieldsDateWheelStyle] chrome,showCustomWheelPickersheet API.UnifiedPickerSheetModalSettings— theme and per-fieldshowModalBottomSheetflags:isScrollControlled,isDismissible,enableDrag,useSafeArea,showDragHandle. Set on [UnifiedInputThemeData.pickerSheetModalSettings], [UnifiedPickerSheetStyle.modalSettings], orpickerSheetModalSettingson picker fields. [showUnifiedFieldsPickerBottomSheet] applies resolved flags.UnifiedBasePickerSheetStyle— shared sheet chrome:sheetBackgroundColor,sheetBorderRadius,contentPadding,footerPadding,panelPadding,panelBackgroundColor,panelBorderRadius, and panel border. Set on [UnifiedInputThemeData.basePickerSheetStyle] or [UnifiedPickerSheetStyle.basePickerSheetStyle]; list pickers, [CustomWheelPicker], and wheel sheets resolve it before field overrides.- Picker list helpers —
unifiedPickerItemLabel,unifiedPickerDefaultItemWidget, andunifiedPickerResolveListIteminunified_picker_item_builders.dart. Picker sheets default list rows usevalueToString(not rawtoString()). Field display text and controllers use the same helpers. Exported from the package barrel.
Breaking #
- Picker header
helpText→helpWidget— [UnifiedInputPickerHeaderStyle] and [UnifiedPickerSheetHeader] usehelpWidget([Widget]) instead ofhelpText([String]). [helpTextStyle] still applies via [DefaultTextStyle.merge].
Fixes #
- Month / year picker year control — jump panel and month-granularity views use a horizontally scrollable year strip (mouse drag + wheel, optional center magnification and edge fade via
yearStripStyle/wheelStylefallbacks) instead of a numeric step field or dropdown. textStyleon [UnifiedNumberField] / [UnifiedNumericStepField] — removed hardcodedUnifiedColors.textColorDarkfallback so [UnifiedInputFieldDefaults.textStyle] applies (e.g. Quantity in the example). Optional per-fieldstyleon [UnifiedNumberField].- [CustomWheelPicker] — horizontal layout with few options no longer shows empty phantom cells (centered row when content fits; selection overlay removed for horizontal). Vertical wheels respond to mouse wheel. Sheet uses [UnifiedPickerSheetHeader] and [UnifiedBasePickerSheetStyle] (including
pickerSheetStyleon the field). sheetBorderRadius— [CustomWheelPicker] sheet content is clipped to the resolved radius; safe-area inset is applied inside the clip sosheetBackgroundColorno longer paints square corners under the home indicator. [UnifiedPickerSheetHeader] uses the same top corners fromsheetBorderRadius.
Docs #
- README: date picker styling,
UnifiedBasePickerSheetStyle,UnifiedPickerSheetModalSettings,CustomWheelPicker, picker list helpers,helpWidget, and Upgrading to 0.2.6. Example README updated for 0.2.6 demos.
0.2.5 #
Fixes #
textStyleon [UnifiedPhoneField] — respects [UnifiedInputFieldDefaults.textStyle] /textStylePersianfrom theme (placeholders and dial code included). Persian mode mergestextStylewithtextStylePersianinstead of using only the Persian style. Optional per-fieldstyleoverride.textStyleon [UnifiedDateField] / [UnifiedDateRangeField] — no longer hardcodesTextStyle(fontSize: 14); defers to theme via [UnifiedBaseTextField] and [UnifiedInputThemeResolver.fieldTextStyle]. [UnifiedDateField] passesdigitCalendarKindfor Jalali / Persian digit styling. Optional per-fieldstyle; [UnifiedDateRangeField] addsinitialCalendarKindfor digit/Persian resolution.
Features #
styleon [UnifiedPhoneField], [UnifiedDateField], and [UnifiedDateRangeField] — same precedence as [UnifiedBaseTextField.style] (wins over themetextStylewhen set).
0.2.4 #
Features #
textStyle/textStylePersianon [UnifiedInputFieldDefaults] — default value [TextStyle] for field text; Persian variant used when Persian digits are active (usePersianDigitsGlobally, Jalali calendar, or field-levelusePersianDigits). Resolved via [UnifiedInputThemeResolver.fieldTextStyle]; decoration / widgetstylestill win.placeholderStyle— optional [TextStyle] on [UnifiedInputDecoration], [UnifiedInputFieldDefaults], and [UnifiedBaseTextField]. Placeholders inheritfontFamily,fontSize, and other typography fromfieldStyle/styleby default, with theme hint color/opacity; explicitplaceholderStyleoverrides win.- Per–label-mode chrome — [UnifiedInputLabelModeStyle] on [UnifiedInputFieldDefaults] (
labelInRowStyle,labelInColumnStyle,floatingLabelStyle) forlabelStyleandlabelPaddingper [UnifiedFieldLabelMode]. Field-levelUnifiedInputDecoration.labelPadding/ [UnifiedBaseTextField.labelPadding] override theme. selectTextOnFocus— on text and number fields (including form wrappers): when enabled, focusing a non-empty editable field selects all text so the next keystroke replaces the value. Set per widget or via [UnifiedInputFieldDefaults].
0.2.3 #
Features #
- Local picker sheet chrome — every picker field (single/multi, sync/async, customizable) and matching
UnifiedForm*Picker*wrappers accept optionalpickerSheetStyle,pickerSheetBackgroundColor, andpickerHeaderStyle(includingitemOrder). Direct params win overpickerSheetStyle, which wins over [UnifiedInputThemeData].
0.2.2 #
Features #
- [UnifiedNumberField] / [UnifiedFormNumberField] / [UnifiedNumericStepField] — configurable step buttons: [UnifiedNumericStepButtons] (
both,incrementOnly,decrementOnly,none), [UnifiedNumericStepButtonPlacement] (split,leading,trailing), and customdecrementIcon/incrementIcon. Decorationprefix,prefixIcon, andsuffixIconcompose with buttons (prefix at natural width, then buttons; trailing buttons before suffix). textAlignon number fields (defaultTextAlign.center).- [UnifiedInputDecoration] — optional
suffixWidth/suffixHeightto force a suffix slot size. - Picker sheet header — [UnifiedPickerHeaderItem] +
itemOrderlist on [UnifiedInputPickerHeaderStyle] / [UnifiedPickerSheetHeader]: lay out title (expanded), help, close, and clear in any order; unavailable slots are skipped. Defaults to title → help → close → clear. AlsohelpWidget, customcloseButton/clearButton, andtitleWidget. (Breaking: picker header/themehelpTextremoved — usehelpWidgetinstead.)
Fixes #
- Adornment sizing — [UnifiedSuffixIconChrome] uses intrinsic width/height for custom
suffixIcon/prefixwidgets; fixed 32×32 only for [Icon]s / [IconButton]s or whensuffixWidth/suffixHeightare set. Avoids clipping text or wide trailing labels. - Live validation on edit — user edits only clear errors when the value becomes valid (no re-
validate()while still invalid), fixing focus loss on [UnifiedFormTextField] and delete-and-retype. [unifiedFormClearErrorIfValid] on form pickers, dates, time, duration, and multi-select after a selection.
0.2.1 #
Fixes #
- Widget vs controller validator — fields sync
validator:on the widget ontofieldControllerso [UnifiedFieldValidation.validateFields] matches [FormState.validate] / inline errors ([UnifiedTextField], [UnifiedFormTextField], [UnifiedSinglePickerField], [UnifiedMultiPickerField], and form picker wrappers). - [UnifiedFormSinglePickerField] — rebuilds when
fieldController.errorTextchanges only (imperative validate). - Live error updates — after a failed validate, editing the value re-runs validation on [BaseUnifiedFieldController] and
UnifiedForm*fields (error clears when fixed, without tapping validate again).
0.2.0 #
Features #
UnifiedInputFieldDefaults— set [UnifiedBaseTextField] layout and behavior on [UnifiedInputThemeData.fieldDefaults]:labelMode,rowLabelRatio,height,borderRadius,borderSide,showError,showClearButton,resetTextWhenLocked,autovalidateMode,contentPadding,mustResolveTextDirectionByInput, and related colors. Merged into [resolveUnifiedDecoration] before field overrides. Field-level params still win;nullon [UnifiedBaseTextField] defers to theme.
Breaking changes #
- [UnifiedBaseTextField] — several constructor params are now nullable and defer to theme / palette when omitted (
backgroundColor,borderRadius,borderSide,height,labelInRow,showError,showClearButton,resetTextWhenLocked,mustResolveTextDirectionByInput). [UnifiedBaseTextFieldState.isValid] now requires a [BuildContext] argument.
Fixes #
- Customizable picker fields — when
allowFreeTextis true (default), tapping the field focuses the text input for typing; the picker opens only via the suffix icon. Tap-to-open on the whole field applies whenallowFreeTextis false. fieldDefaults—borderRadius,labelMode/ label-in-row layout, and other chrome now apply on [UnifiedTextField], [UnifiedFormTextField], and fields using [UnifiedBaseTextField] (including whendecorationSetis set). Removed hardcoded18radius /Colors.black26overrides on wrappers that blocked theme values.- Controller validation UI — [UnifiedTextField] rebuilds when [UnifiedTextFieldController] error changes (
ListenableBuilder). Label-in-row layout shows the error message below the field. [UnifiedFieldValidation.validateFields] documented: requiresfieldController:on the field. - [UnifiedFormTextField] — listening to [UnifiedTextFieldController] now rebuilds when only
errorTextchanges (not only value). [shakeOnError] works with [UnifiedFieldValidation.validateFields]. If bothcontrollerandfieldControllerare passed, wire the same [TextEditingController] via [UnifiedTextFieldController.textController].
0.1.9 #
Features #
- Per-state field decoration — optional [UnifiedInputDecorationSet] on every field (
decorationSet) and globally via [UnifiedInputThemeData.fieldDecorationSet]. Layers:base,focused,valid,error,locked,disabled,loading,readOnly. Omitted layers keep current palette / single-[UnifiedInputDecoration] behavior. [UnifiedPhoneField] applies the same state resolution for borders and fills.
0.1.8 #
Features #
- Picker grid layout — optional
gridItemBuilderon every list-based picker field and sheet. Pass a full [SliverGridDelegate] viagridDelegate, or use [unifiedPickerDefaultGridDelegate] for a fixed cross-axis count. Single-select tiles receive(index, item, onSelect); multi-select addsisSelected. - Form pickers —
itemToWidget,searchBuilder,gridItemBuilder, andgridDelegateon allUnifiedForm*Picker*wrappers (UnifiedFormSinglePickerField,UnifiedFormMultiPickerField, async and customizable variants). - Standalone sheets — [showUnifiedSinglePickerSheet] and [showUnifiedMultiPickerSheet] accept the same list/grid options.
CustomizableSinglePickerController/CustomizableMultiPickerController— [openPicker] via attached field orbindPicker/bindAsyncPicker(same pattern as [UnifiedPickerFieldController]).- Exports — [UnifiedPickerGridItemBuilder], [UnifiedPickerMultiGridItemBuilder], [unifiedPickerDefaultGridDelegate], [unifiedPickerResolveGridDelegate].
Fixes #
UnifiedCustomizableAsyncPickerField(and sync customizable pickers) — sheet opens on full-field tap whenallowFreeTextis true, not only via the suffix icon.- Customizable picker fields —
disabledalongsideisDisabled;GestureDetector+interactionBlockedfor reliable tap-to-open.
0.1.7 #
Features #
UnifiedPhoneField— phone input with SVG country flag, optional dial-code section, national mask, and validation. Editable country code uses one field (++ dial + national via [UnifiedPhoneFullNumberFormatter]); fixed or read-only dial code uses a label + national field.UnifiedPhoneField— Persian digit mode viausePersianDigitsanddigitCalendarKind(Jalali): parses Persian/Arabic-Indic input, localizes display (including partial dial prefixes), and applies KookFaNum when active.UnifiedCountry— enum of ~250 countries (ISO, name, dial code). UseUnifiedCountry.ir,UnifiedCountries.byIso('DE'),UnifiedCountries.matchDialCode, etc. Regenerate fromtool/countries.jsonviadart run tool/generate_unified_countries.dart.UnifiedCountryWidget— public flag + optional name/dial row (showNamedefaults tofalse). [showUnifiedPhoneCountryPicker] for standalone country selection.UnifiedFlag— ISO or asset stem → bundled SVG; optionalsize,width,height,borderRadius; reads [UnifiedInputPhoneStyle] from theme.UnifiedInputPhoneStyle/UnifiedInputThemeData.phoneStyle— dial-code box chrome, flag dimensions, invalid dial-code display (messagevshighlightText).UnifiedPhoneFieldController—UnifiedPhoneNumbervalue, national/dial controllers,setCountry, unified single-field entry mode.UnifiedFieldLabelMode—labelInRow,labelInColumn, andfloatingLabel(default on [UnifiedBaseTextField]); set vialabelModeon fields or [UnifiedInputDecoration]. LegacylabelInRow: truestill maps to row mode.
Breaking changes #
UnifiedPhoneCountryremoved — use the [UnifiedCountry] enum (UnifiedCountry.ir, notUnifiedPhoneCountry(isoCode: …)). India:UnifiedCountry.countryIN.UnifiedPhoneCountriesdeprecated — use [UnifiedCountries].UnifiedCountryRowrenamed to [UnifiedCountryWidget].
Fixes #
- Placeholder / hint styling uses [UnifiedColors.hintColor] at 0.72 opacity by default.
- Placeholder no longer falls back to the label string on [UnifiedTextField] and [UnifiedNumberField].
- Phone layout: bounded row height, label modes on [UnifiedPhoneField],
height/widthsupport. - Static analysis:
dart analyzeclean onlib/(including vendoredscrollable_listdartdoc for pub.dev scoring).
0.1.6 #
Features #
UnifiedInputThemeScope— global field chrome viaUnifiedInputThemeData: disabled/locked label and field colors, placeholder, required icon, validation, suffix/clear/loading colors, picker sheet background, default suffix icons per field type.UnifiedInputPickerHeaderStyle— settable picker sheet headerpadding,backgroundColor,titleStyle, andclearButtonColor(sharedUnifiedPickerSheetHeaderfor single and multi pickers).UnifiedInputMultiPickerCheckboxStyle— settable multi-picker checkboxsize,borderRadius,fillColor,checkColor, andborderColor.UnifiedSuffixIconChrome— 32×32 aligned suffix slot so date/time/duration icons line up with picker dropdown and lock/clear affordances.- Custom duration columns —
pickerColumnswith fixed wheel ranges (year0…999, month0…11, week0…4); presets onUnifiedFieldsDurationColumnPresets. - Time / duration wheel pickers, Persian digits (KookFaNum), Jalali calendar and field display improvements (see 0.1.4–0.1.5 notes below).
API #
UnifiedFieldsContextX— prefixed getters (unifiedFieldsScreenWidth,unifiedFieldsUseDialogLayout, …); legacywidth/isDesktopdeprecated.UnifiedFieldsDateWheelStyle.forPicker— namedoverrides:and optionalcontext:for themed sheet background.unifiedFormatDuration/unifiedTryParseDuration— namedgranularity:, optionalpickerColumns:/calendarKind:.
Fixes #
- Picker sheets use theme scope for background color instead of hard-coded values.
- Static-analysis cleanup (
dart analyze libclean).
0.1.5 #
Features #
UnifiedInputThemeData— optional scope viaUnifiedInputThemeScope(onlychildrequired): brightness/palette; disabled & locked label/field colors and opacities; placeholder; required icon; validation/suffix/loading colors;pickerSheetBackgroundColor;UnifiedInputPickerHeaderStyle(header padding and colors);UnifiedInputMultiPickerCheckboxStyle(radius and colors);UnifiedInputDefaultSuffixIcons.UnifiedInputThemeResolver— helpers used by [UnifiedBaseTextField] (disabledLabelColor,disabledFieldColor,requiredIcon,placeholderStyle,validationColor, etc.) plus picker sheet background and default suffix icons.- Picker sheets and wheel chrome use scope sheet background when set; otherwise
Theme.bottomSheetTheme.backgroundColorthen palettesheetBackground.
API #
UnifiedFieldsContextXgetters renamed to avoid app extension clashes:unifiedFieldsScreenWidth,unifiedFieldsScreenHeight,unifiedFieldsUseDialogLayout,unifiedFieldsPrimaryColor(old names kept as@Deprecated).UnifiedFieldsDateWheelStyle.forPicker— optionalcontext:for themed sheet background; positionaloverridesreplaced with namedoverrides:.
Fixes #
- Static analysis: removed unnecessary imports, fixed
use_build_context_synchronouslyin async pickers,use_key_in_widget_constructorsonUnifiedDurationPickerSheet. - Duration calendar columns: year
0…999, month0…11, week0…4on wheels (not squeezed by smallmax).
0.1.4 #
Features and fixes #
- Time/duration wheel pickers, custom duration columns, Persian digits (KookFaNum), Jalali calendar/display fixes, and related APIs (see git history for full 0.1.4 scope).
0.1.3 #
- Field states on
UnifiedBaseTextField:loadingshows a suffix spinner (no full-field overlay or muted disabled chrome);interactionBlockedblocks taps/focus without looking disabled (date, async pickers).isDisabled/disabledshow placeholder and value together when both are set. labelInRow: one outer rounded border around label + body with a straight vertical divider (no inner radius on the body side).- Field controllers:
UnifiedPickerFieldController,UnifiedMultiPickerFieldController, async/date/time/duration/number variants, andUnifiedFormControllerfor imperativeopenPicker/requestFocusthat match tapping the bound field when mounted (attachUnifiedFieldHandlesinfield_controller_sync.dart). - Form + binding sync:
UnifiedForm…picker/date/time/async fields listen tobindingsobinding.clear()updates theFormFieldUI;syncFormFieldFromExternalValuehelpers for external writes. - Date field: uses
interactionBlockedinstead ofdisabled: trueso the picker opens without disabled styling. - Async pickers: removed full-field loading overlay; loading uses the base field suffix spinner.
- Dartdoc: documented remaining public controller APIs and
UnifiedDurationPickerSheetfields;public_member_api_docsis clean forlib/.
0.1.2 #
- Hoisted
isRequiredandplaceholderto the root constructor of every field. Decoration values (UnifiedInputDecoration.requiredField/UnifiedInputDecoration.placeholder) are still honored as a fallback for backwards compatibility, but field-level parameters now win. - Added
Form-aware wrappers for the customizable pickers:UnifiedFormCustomizablePickerField,UnifiedFormCustomizableMultiPickerField,UnifiedFormCustomizableAsyncPickerField. - Added
example/— runnable Flutter app demonstrating form validate/save/reset and theme scope. - Expanded dartdoc on public APIs;
public_member_api_docsenabled forlib/.
0.1.1 #
- Initial pub.dev release scaffolding.
0.1.0 #
- Initial release.