craft_ux 1.0.8 copy "craft_ux: ^1.0.8" to clipboard
craft_ux: ^1.0.8 copied to clipboard

A Flutter package that provides a collection of reusable UI components and utilities for building beautiful and consistent user interfaces.

Changelog #

0.0.7 #

Changed #

  • Error messages displayed in two places for amount fixed.

0.0.6 #

Changed #

  • Error messages for all field widgets now support up to three lines with ellipsis for better overflow handling and mobile readability.

0.0.5 #

Changed #

  • Checkbox label now supports up to two lines with ellipsis, and the required asterisk is appended using RichText for improved mobile layout and overflow handling.

0.0.4 #

Added #

  • Mobile field widget: New input type for phone numbers with built-in validation
  • Numeric-only input validation
  • Configurable maximum length (default: 10 digits)
  • Phone keyboard type for better mobile input
  • Proper cursor position management
  • Consistent styling with form theme

0.0.3 #

Added #

  • Section divider: Visual divider between form sections for improved readability.
  • Horizontal radio buttons: Support for displaying radio options in a horizontal row.
  • Pretty-printed JSON view: Added a monospace, copyable JSON code view for submitted data.
  • Loading indicator for delete: Per-row loading spinner for delete actions in repeatable sections.

Changed #

  • Amount field UX: Now shows raw input while editing and formats with commas on blur, for a more intuitive experience.
  • Date picker field: Improved display and parsing of date values, including support for initial values.

Fixed #

  • Autocomplete overlay: Overlay now hides correctly after selecting an option.
  • Error borders: Error borders now display correctly for all field types, including month and amount fields.
  • Validation: Improved required/empty value checks for all field types.

0.0.2 #

  • Added comprehensive form theming system with DynamicFormTheme
  • Improved field styling consistency across all input types
  • Enhanced form section styling with customizable borders and spacing
  • Fixed onChange behavior consistency in text, password, and textarea fields
  • Added proper handling of custom types in dropdown_search
  • Improved form validation and error handling
  • Added support for conditional field rendering
  • Enhanced documentation and example app

0.0.1 #

  • Initial release
  • Added HTTP Client Provider
  • Added Form handling utilities
  • Added basic UI components
  • Implemented error handling and logging

0.0.9 #

Changed #

  • Dropdown overlays now dynamically size to available space above/below the field and are always anchored flush to the field (never floating or misaligned).
  • Only one dropdown overlay can be open at a time; opening a new dropdown closes any previously open overlay.
  • Overlay positioning is now left-aligned and matches the field width and position for perfect alignment.
  • Multi-select dropdowns (search) on mobile now use a modal bottom sheet with local state for instant UI updates and robust selection.
  • Improved tick/selected state logic for multi-select dropdowns (always value-based, always in sync).

Fixed #

  • Dropdown overlays no longer overflow or appear detached when the field is at the bottom of the screen.
  • Multi-select dropdowns now refresh and show correct selection state immediately after search/filter.

0.0.8 #

Changed #

  • Amount field now formats numbers in Indian comma style (e.g., 12,34,567.89) on blur for all amount fields.
  • Dropdown overlays now use dynamic height based on available space and item count, never exceeding screen bounds.
  • Improved overlay UX for both single and multi-select dropdowns, including keyboard and scroll handling.

Fixed #

  • Overlay for dropdown fields now always starts directly above or below the field, even for the last field in the form.
  • Fixed issues with dropdown overlays being hidden behind the keyboard or clipped at the screen edge.

0.0.10 #

Added #

  • Modal shadow/barrier behind dropdown overlays to block background interaction and visually focus the user on the dropdown.

Changed #

  • Overlay barrier color now uses .withAlpha for compatibility with latest Flutter versions (replaces deprecated .withOpacity).
  • Dropdown overlays now prevent scrolling or interacting with the form while open, ensuring a robust and modal-like UX.

Fixed #

  • Minor bug fixes and code cleanup for overlay and dropdown behavior.

1.0.0 #

Added #

  • Dropdowns:
    • Added scroll indicators (scrollbars) to all dropdown overlays and bottom sheets for improved UX with long lists.
    • Multi-select dropdowns now feature a visible "Submit" button with outlined styling for consistency.
  • Form Modes:
    • Introduced DisplayMode (EDIT/VIEW) for forms, allowing fields to be rendered as read-only or editable.
  • Types:
    • Exported DisplayMode enum for use across the codebase.
  • Month Field:
    • Month dropdown now respects the disabled property and is non-interactive in view mode.

Changed #

  • Dropdown Search:
    • Improved initial value handling: dropdowns now correctly sync their selected value with the parent form state on load and when options arrive asynchronously.
    • Enhanced multi-select value matching to handle type mismatches (e.g., string vs int).
  • Dropdown Option Sync:
    • Dropdowns now re-initialize selected options when their options or value change, ensuring correct display even with async data.
  • UI Consistency:
    • Outlined button style for multi-select submit matches text field borders.
    • Scrollbar always visible for dropdown lists.

Fixed #

  • State Sync:
    • Fixed issue where dropdowns would not show the correct initial value if options were loaded after widget initialization.
    • Fixed bug where multi-select dropdowns would not display selected options due to type mismatches.
  • Error Handling:
    • Prevented setState calls after widget disposal in dropdowns, resolving framework assertion errors.
    • Fixed Scrollbar error by ensuring a ScrollController is provided when thumbVisibility is true.

1.0.1 #

Fixed #

  • Fixed the null check error or source api url

1.0.2 #

Fixed #

  • Fixed data type issue

1.0.3 #

Fixed #

  • Fixed the autofill value setting as null
  • Fixed the checkbox overflow issue

1.0.4 #

Fixed #

  • Changed the month error max line
  • Checkbox flexi issue resolved

1.0.5 #

Changed #

  • Dropdowns:
    • ScrollController is now properly disposed in both dropdown and dropdown search widgets, preventing memory leaks.
    • All dropdown value comparisons are now type-safe (using .toString()) to prevent selection bugs with int/string mismatches.
    • Improved robustness and prevention of Scrollbar errors by ensuring the same controller is used for both Scrollbar and ListView.

1.0.6 #

Changed #

  • Dropdowns & Autocomplete:
    • All value comparisons for option selection and autofill now use .toString() for type safety, preventing bugs when API or form values are int/string mismatches.
    • Improved robustness of dropdown and autocomplete widgets by ensuring consistent value matching and selection logic.

Fixed #

  • Memory Management:
    • All custom dropdowns and bottom sheets now properly dispose their ScrollController to prevent memory leaks.
  • Scrollbar/ScrollController:
    • Ensured the same ScrollController is always used for both Scrollbar and ListView/ListView.builder, preventing Scrollbar errors and assertion failures.
  • Autofill:
    • Fixed an issue where autofill would not work if the selected option's value type did not match the form value type.

1.0.7 #

Changed #

  • Checkbox
    • Fixed the checkbox validation issue
    • Improved the condition in validation function

1.0.8 #

Added #

  • Repeatable Sections:
    • Enhanced support for nested repeatable sections (e.g., property_details[0].data.floor_details[{index}])
    • Added deriveRepeatableArrayPath and deriveRepeatableBasePatternFromConcrete utility functions
    • Improved initializeForm to handle existing data length for repeatable sections
    • Added comprehensive debugging for form state management

Fixed #

  • Dynamic Form Removal:
    • Fixed handleRemoveMore function to properly handle nested object patterns
    • Resolved issue where deleted sections were still appearing in submitted data
    • Fixed regex escaping issues in field pattern matching
    • Improved removeFieldAtIndex function to handle nested patterns correctly
    • Fixed error cleanup for deleted sections (errors no longer persist after deletion)
    • Resolved issue where validation errors were regenerated for deleted fields during form submission

Changed #

  • Form State Management:
    • Replaced complex regex matching with simple string operations for better reliability
    • Enhanced field removal to clean up all related state (values, options, errors, touched, dependentValues, fieldsDisabled)
    • Improved index shifting logic for remaining fields after deletion
    • Added immediate key purging to prevent orphaned values in nested objects
    • Enhanced autofill target field cleanup during section removal

Technical Improvements #

  • Type Safety:
    • Added null checks for autofill source values to prevent runtime errors
    • Improved error handling in form state operations
  • Performance:
    • Optimized field removal and index shifting operations
    • Reduced redundant operations in form state updates
2
likes
130
points
147
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a collection of reusable UI components and utilities for building beautiful and consistent user interfaces.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, dropdown_search, flutter, http, intl, logger, provider

More

Packages that depend on craft_ux