unified_fields 0.1.4
unified_fields: ^0.1.4 copied to clipboard
Standalone unified form fields, pickers, and date/time UI for Flutter apps.
0.1.4 #
Features and Fixes #
-
Time wheel picker:
UnifiedFieldsTimePickerStyle.wheelsonUnifiedTimeOfDayField/UnifiedFormTimeOfDayFieldwithUnifiedFieldsTimeGranularity(hours,hoursMinutes,hoursMinutesSeconds);showUnifiedFieldsTimePicker; Shamsi digit toggle viainitialCalendarKind. -
Duration wheel picker:
UnifiedFieldsDurationPickerStyle.wheels(default) with extendedUnifiedDurationGranularity(hours,hoursMinutes,hoursMinutesSeconds, legacyminutesSeconds); sharedUnifiedFieldsHmsWheelPickerSheetchrome for simple H:M:S;UnifiedFieldsDurationColumnWheelPickerSheetfor custom columns. -
Custom duration columns:
pickerColumns: [UnifiedFieldsDurationColumn.year, UnifiedFieldsDurationColumn.week, …]builds wheels in that order (year / month / week / day / hour / minute / second); presets onUnifiedFieldsDurationColumnPresets; helperscomposeUnifiedDuration,decomposeUnifiedDuration,formatUnifiedDurationColumns. -
Persian digits: bundled KookFaNum font and
UnifiedFieldsTypography— Shamsi (Jalali) pickers show ۰–۹ by default; setusePersianDigitsGlobally: truefor all unified fields. -
Typography API:
localizeDigits,mergeDigitStyle,toPersianDigits,fromPersianDigits; optionalpersianFontFamily. -
Duration / time form fields:
UnifiedFormDurationFieldgainspickerColumns,pickerStyle,initialCalendarKind,showCalendarKindToggle. -
UnifiedFieldsStrings.durationColumnHeader: localized column headers for duration wheels (Gregorian and Shamsi). -
Duration calendar columns: year / month / week wheels use fixed ranges (0…999, 0…11, 0…4) instead of shrinking to
0whenmaxis below one year. -
Calendar mode: Shamsi month title bar and jump-panel year field show Persian year numerals (not only wheel / day grid).
-
initialCalendarKind: jalalinow applies to calendar (grid) pickers, not only wheel mode (UnifiedFieldsDatePickerSheetwas missing the parameter). -
Jalali field display: after pick (or when calendar kind is Jalali), the date field shows Shamsi text (e.g.
۱۳,مرداد ۱۴۰۳) instead of GregorianDateFormat; picker confirm syncs kind viaonConfirmedCalendarKind. -
unifiedFormatDuration/unifiedTryParseDurationuse namedgranularity:and optionalpickerColumns:/calendarKind:(update call sites from positionalgranularity). -
UnifiedNumericStepField.digitCalendarKind— optional Shamsi digit context for numeric surfaces inside pickers. -
Wheel date picker:
UnifiedFieldsDatePickerStyle.wheelsonUnifiedDateField,UnifiedFormDateField, andshowUnifiedFieldsDatePicker— scroll wheels (year · month · day) with Gregorian / Shamsi toggle; column set followsUnifiedFieldsDatePickerGranularity. -
Wheel styling: optional
UnifiedFieldsDateWheelStyle(themed viaforPicker); desktop mouse / trackpad drag viaListWheelScrollView. -
Shamsi wheel copy: column headers سال / ماه / روز and Farsi weekday names on day rows (
PersianJalaliCalendar.jalaliDayWheelLabel). -
Calendar today: hollow circle outline (same shape as selection) instead of a rectangular border.
-
Wheel alignment: centered labels in each column for Gregorian mode.
-
showWeekdayInWheel: optional weekday names in the day wheel (trueby default); fixed-width day + weekday layout viawheelDayNumberWidth/wheelWeekdayWidthonUnifiedFieldsDateWheelStyle. -
Renamed
AppInputController→UnifiedInputPicker,AppUnifiedFieldShell→UnifiedFieldShell(deprecated typedefs). -
Localization:
UnifiedFieldsStrings.instancefor Cancel, Confirm, picker copy, and wheel headers. -
Breaking: Renamed
AppInputController→UnifiedInputPickerandAppUnifiedFieldShell→UnifiedFieldShell. Deprecated typedefs remain for one release. -
Localization: All package button/label strings (Cancel, Confirm, Clear, Done, Pick, Suggestion, date picker copy, time hour/minute labels, default duration title) live in
UnifiedFieldsStrings. SetUnifiedFieldsStrings.instancebeforerunAppto customize.UnifiedDatePickerStringsis deprecated and forwards to the same instance.
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,UnifiedFormCustomizableAsyncMultiPickerField. - Added a runnable
example/Flutter project demonstrating the showcase page. - Renamed
AppColorstoUnifiedColorsto match the package naming style. - Dartdoc comments on every public member across the package
(palette, decoration, controllers, base text field, sheet helpers,
color tokens, all unified and form-aware fields, plus the vendored
utility extensions). The
public_member_api_docslint is now enforced inanalysis_options.yamlto keep coverage from regressing.
0.1.1 #
- Documentation pass on the public API and minor README polish.
0.1.0 #
- Initial release: unified text / number / picker / async picker / date / time / duration fields,
Gregorian–Jalali calendar sheet, vendored scrollable positioned list, and
Form-aware wrappers.