json_form_engine 0.3.1
json_form_engine: ^0.3.1 copied to clipboard
JSON-driven dynamic form builder for Flutter: validated, conditional, multi-step forms with 50+ field types, theming, and localization.
Changelog #
0.3.1 #
- Shortened the pubspec
descriptionto fit pub.flutter-io.cn's 60-180 character scoring range (it was previously too long, costing the full 10-point "valid pubspec.yaml" score). - Fixed two broken dartdoc reference links (
[DynamamicForm]typo, an unresolved[reset]link) flagged by pana's analysis.
0.3.0 #
- Built-in media pickers: the
image,cameraandfilefield types now work straight from JSON — no adapter registration needed. Powered by Flutter's officialimage_pickerandfile_selectorplugins.image: gallery and/or camera (source:gallery/camera/bothwith a localized source bottom sheet), thumbnail previews,multiple+maxImages,imageQuality,maxWidth/maxHeight,preferredCamera, video picking (video: true,maxDurationSeconds) andpreviewSize.camera: camera-only shorthand forimage.file: document picking withextensions/mimeTypesfilters,multiple+maxFiles, file-name rows with remove buttons.- Values are stored as the picked path
String(orList<String>formultiple), sorequiredvalidation, conditions, dirty tracking and edit mode work like any other field. - New
MediaPickerAdapter.instanceseam: swap the picking service (cropper, custom permission flow, test fake) without replacing the field UI;FieldFactory.registeroverrides still win entirely. - New localized strings (
gallery,camera,selectImage,selectFile,remove) in all 6 built-in locales.
0.2.1 #
- Update demo data and maintainer contact in the example app and tests.
0.2.0 #
-
Edit mode / prefilled forms:
DynamicForm(initialData: record), JSON root"data"map, andsetFormData(record, asInitial: true). Prefilled forms start clean,reset()restores the record, and the dirty baseline survives runtime JSON changes. -
Field UI styles from JSON:
style/decorationat theme, form and field level with variantsoutlined,rounded,filled,underline,noneplus borderRadius, fill/border colors, contentPadding, labelBehavior and text/label/hint styles. -
Dirty tracking:
controller.isDirty, listenablecontroller.dirty,markClean(); auto-clean on attach, reset and successful submit. -
Discard guard: JSON
"confirmDiscard": trueshows a localized unsaved-changes dialog on back navigation; customdiscardTitle/discardMessage, code override viaDynamicForm(confirmDiscard: ...), fully custom dialog viaDynamicFormThemeData.discardDialogBuilder.
0.1.0 #
Initial release.
- 50+ JSON-driven field types (text family, date/time, selection, sliders, rating, stepper, color picker, OTP/PIN, autocomplete, layout fields, expansion/group nesting, pluggable adapter types).
DynamicFormControllerwith full value / validation / focus / visibility / structure-mutation API andlisten().- JSON-configurable validators (required, email, phone, url, number, decimal, min, max, minLength, maxLength, regex, matchField, passwordStrength) + custom validator registry.
- Conditional logic (
visibleWhen/enabledWhen/requiredWhen) with and/or/not and 12 comparison operators. - Async options loading with
dependsOnchains (country → state → city). - Multi-step wizard forms with per-step validation.
- Per-field
ValueNotifierrebuilds + lazyListView.builderrendering. - Theming hooks (
DynamicFormTheme) and full renderer override viaFieldFactory. - Localized messages: en, hi, ar (RTL), es, fr, de + custom translations.