rj_form_engine 0.2.1
rj_form_engine: ^0.2.1 copied to clipboard
Schema-driven dynamic form engine for Flutter with validation, rich field types, and minimal dependencies.
0.2.1 #
- Added toggle obscure functionality to show/hide text in password fields.
0.2.0 #
Refactor release — improved API consistency, performance, and type safety.
Added #
- Typed
FieldConfigsubclasses:SliderConfig,SpinnerConfig,ImageConfig,DateConfig,TextConfig,TimeConfig FieldMeta.configproperty for typed field configuration (takes precedence over flat params)- Typed config accessors on
FieldMeta:sliderConfig,spinnerConfig,imageConfig,dateConfig,textConfig,timeConfig errorsSummaryBuildercallback onRjFormfor custom error summary messagesonSuccesscallback onRjForm— fires afteronSubmitcompletes successfullyautoClearOnSubmitoption onRjFormto automatically reset form after submissionautoDismissKeyboardoption onRjForm(default:true)FieldMeta.copyWith()method for creating modified field copiesSemanticslabels on all field widgets for improved accessibilityRjTimeUtilsutility class for custom date/time formatting
Changed #
CustomFieldBuildersignature now includes the fullFieldMetaas the second parameterDropdownSource.asyncloader now receivesparentValueas a named parameter:({String? parentValue})FieldMeta.sectionfactory now requires an explicitkeyparameter to prevent key collisions- Per-field rebuild optimization —
_FieldBuilderonly rebuilds when its own value, error, or parent value changes - Dropdown "waiting for parent" state now uses
AbsorbPointer+Opacityinstead of deprecatedinitialValue RjFormThemeuseswithValues(alpha:)instead of deprecatedwithOpacity()
Fixed #
- Section key collision when multiple sections share the same label
- Improved Dropdown handling to align with controlled form patterns
TextEditingControllermemory leak inRjTimePickerField- Dropdown assertion crash when pre-filled value is not in the loaded items list
- Form state sync when
FieldMetachanges at runtime viadidUpdateWidget
Breaking Changes #
CustomFieldBuildersignature changed: addedFieldMeta fieldas the second parameter. Update custom field builders from(context, value, onChanged, errorText)to(context, field, value, onChanged, errorText).FieldMeta.sectionnow requires an explicitkeyparameter. Previously auto-generated keys from labels could collide.DropdownSource.asyncloader signature changed:parentValueis now a named parameter. Update from(parentValue) async => ...to({parentValue}) async => ....
0.1.0 #
Initial public release.
Added #
- 13 field types:
text,number,date,dropdown,textArea,image,slider,timePicker,spinner,toggle,radio,chip,custom FieldMetaschema-driven field definition with 20+ configuration optionsRjFormwidget — renders fields from aList<FieldMeta>schemaFormController(ChangeNotifier) for external form state managementDropdownSourceunion type — static or async dropdown item loading- Cascading dropdowns with auto-reload and auto-clear on parent change
FieldDependencyfor conditional field visibility with custom condition predicates- 25+ built-in validators via
RjValidators: email, phone, URL, password rules, date ranges, length bounds, regex patterns, and more RjFormThemefor full visual customization of all field styles- Pre-fill support via
initialValuesfor edit and clone modes - View-only (read-only) mode via
viewOnlyflag onChangedcallback for real-time field change tracking- Error summary display at the top of the form (
showErrorsSummary) - Custom date/time format strings (
dateFormat,timeFormat) FieldMeta.customfor embedding any custom widget via a builder functionFieldMeta.sectionfor visual form section dividers- Keyboard dismissal via tap outside fields
- Minimal dependencies: only
flutterSDK +image_picker - State-management agnostic — works with Provider, Riverpod, Bloc, GetX, or nothing