Generate Flutter forms using JSON, featuring a variety of built-in form controls, support for validation, custom layouts, custom styles, and unlimited nested form grouping.
Package selection guidance compiled from public package information, community data, and project usage.
json_gen_form is a Flutter package that enables dynamic form generation from JSON, supporting a wide range of built-in form controls, validation rules, custom layouts, and styling. It allows for nested form grouping, making it ideal for server-driven UIs. Developers can define forms declaratively in JSON, reducing boilerplate and enabling flexible, maintainable form structures across platforms.
Use cases
Dynamic form rendering from JSON
Server-driven UI with configurable forms
Nested form structures
Real-time form validation
Customizable form layouts
Key features
Built-in form controls
Validation support
Custom layouts and styles
Nested form grouping
JSON-based form definition
Suitable for
Developers building server-driven UIs
Teams needing reusable form logic
Apps requiring dynamic form content
Frontend developers working with JSON schemas
Projects with frequent form changes
Considerations
Requires careful JSON schema design
Limited to supported control types
May need additional validation logic
Runtime parsing overhead
Dependent on accurate JSON input
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
JSON_GEN_FORM
Generate Flutter forms using JSON, featuring a variety of built-in form controls, support for validation, custom layouts, custom styles, and unlimited nested form grouping.
Except for group, row, and col, all types have the following general parameters. All types have extra.
Field
Description
Type
Default Value
Required
type
Type
String
''
true
field
Field Name
String
''
true
label
Label
String
-
-
hiddenLabel
Hidden Label
bool
false
-
value
Default Value
dynamic
-
-
disabled
Disabled
bool
false
-
readonly
Read-Only
bool
false
-
rules
Validation Rules
List
[]
-
extra
Extra Params
dynamic
-
Form Types
group
Field
Description
Type
Default Value
Required
type
Type
String
'group'
true
field
Field Name
String
''
-
label
Label
String
''
-
hiddenLabel
Hidden Label
bool
''
-
children
Sub-Forms
List
[]
-
text
Field
Description
Type
Default Value
Required
type
Type
String
'text'
true
placeholder
Placeholder
String
-
-
General Params
-
-
-
-
password
Field
Description
Type
Default Value
Required
type
Type
String
'password'
true
placeholder
Placeholder
String
-
-
General Params
-
-
-
-
textarea
Field
Description
Type
Default Value
Required
type
Type
String
'textarea'
true
placeholder
Placeholder
String
-
-
General Params
-
-
-
-
number
Field
Description
Type
Default Value
Required
type
Type
String
'number'
true
placeholder
Placeholder
String
-
-
General Params
-
-
-
-
radio
Field
Description
Type
Default Value
Required
type
Type
String
'radio'
true
options
Options
List
[]
-
direction
Options Direction
String
'horizontal'
-
itemHorizontalSpace
Item Horizontal Space
double
16
-
itemVerticalSpace
Item Vertical Space
double
8
-
General Params
-
-
-
-
checkbox
Field
Description
Type
Default Value
Required
type
Type
String
'checkbox'
true
options
Options
List
[]
-
direction
Options Direction
String
'horizontal'
-
itemHorizontalSpace
Item Horizontal Space
double
16
-
itemVerticalSpace
Item Vertical Space
double
8
-
General Params
-
-
-
-
select
Field
Description
Type
Default Value
Required
type
Type
String
'select'
true
options
Options
List
[]
-
multiple
Multiple Select
bool
false
-
General Params
-
-
-
-
switch
Field
Description
Type
Default Value
Required
type
Type
String
'switch'
true
General Params
-
-
-
-
media
Field
Description
Type
Default Value
Required
type
Type
String
'media'
true
mediaType
Media Type (media, image, video)
String
'media'
-
multiple
Multiple Uploads
bool
false
-
General Params
-
-
-
-
ios Configuration info.plist
<key>NSCameraUsageDescription</key>
<string>Need camera for taking photos or scanning codes</string><key>NSPhotoLibraryUsageDescription</key><string>Need access to photo library for selecting photos or videos</string><key>NSMicrophoneUsageDescription</key><string>Need microphone access for recording videos</string>