dynamic_json_form_builder 1.0.1
dynamic_json_form_builder: ^1.0.1 copied to clipboard
A highly advanced, reusable, JSON-driven form builder for Flutter. Supports all major field types, custom theming, validation, conditional logic, and custom user-defined fields.
example/main.dart
import 'package:flutter/material.dart';
import 'package:dynamic_json_form_builder/dynamic_json_form_builder.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final fields = [
{
"key": "email",
"type": "email",
"label": "Email",
"placeholder": "Enter your email",
"required": true,
},
{
"key": "gender",
"type": "dropdown",
"label": "Gender",
"options": ["Male", "Female", "Other"],
"placeholder": "Select your gender",
},
];
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Form Example')),
body: Padding(
padding: const EdgeInsets.all(16),
child: JsonFormBuilder(
config: {"fields": fields},
onChanged: (data) => print(data),
),
),
),
);
}
}