π¦ smart_form_builder
A Flutter SDK package to build dynamic, multi-step, multilingual forms using JSON schemas β with full customization, plugin support, and drag-and-drop visual editing.
This is not a standalone app, but a reusable component library that other Flutter apps can import and use.
β¨ Key Features
π Built-in Field Types
- Text, Multiline, Email, Phone, Password
- Dropdown, Multi-Select, Country/State/City picker
- Checkbox, Radio, Switch, Slider, Stepper
- Date, Time, DateTime picker
- File/Image upload, Signature pad
- Color picker, Rating, Currency, HTML editor
π Language & RTL Support
- Fully multilingual (labels, placeholders, error messages)
- RTL-ready for Arabic/Hebrew
- JSON schema supports localized text
- Auto adjusts alignment based on locale
π¨ High Customization
- Theming with
SmartFormTheme
- Per-field styles via JSON
- Custom validators (sync/async)
- Conditional logic for field visibility
- Plugin support for external data sources & custom fields
π§© Multi-Step Form Wizard
- Break long forms into steps
- Progress indicator (linear, circle, number)
- Step-by-step validation
π¦ Installation
Add to pubspec.yaml
:
dependencies:
smart_form_builder: ^0.1.0
β‘ Quick Start
import 'package:smart_form_builder/smart_form_builder.dart';
import 'package:smart_form_builder/models/field_model.dart';
List<FieldModel> get allFields => [
// === Basic Info ===
FieldModel(
type: 'text',
key: 'name',
label: 'Full Name',
placeholder: 'Enter your full name',
border: 'outline',
borderRadius: 8,
filled: true,
fillColor: '#f8fafc',
borderColor: '#e2e8f0',
focusedBorderColor: '#3B82F6',
prefixIcon: 'person',
),
FieldModel(
type: 'multiline_text',
key: 'street_address',
label: 'Biography',
placeholder: 'Tell us about yourself...',
border: 'outline',
borderRadius: 8,
filled: true,
fillColor: '#f8fafc',
borderColor: '#e2e8f0',
focusedBorderColor: '#3B82F6',
extra: {
'maxLines': 5,
'showCharacterCount': true,
'maxLength': 500,
},
),
FieldModel(
type: 'email',
key: 'email',
label: 'Email Address',
placeholder: 'your.email@example.com',
border: 'outline',
borderRadius: 8,
filled: true,
fillColor: '#f8fafc',
borderColor: '#e2e8f0',
focusedBorderColor: '#3B82F6',
prefixIcon: 'email',
),
]
SmartForm(
fields: allFields,
onSubmit: (data) => print(data),
onFieldChange: (key, value) => print('$key = $value'),
fieldSpacing: 16,
),
π Full Example
For a complete working example with multiple field types, custom themes, and step-by-step forms, check out:
π Full Example on GitHub
License
MIT
Author
sdkwala.com
Libraries
- builders/field_factory
- exporters/schema_parser
- models/field_model
- models/step_model
- plugins/smart_plugin_registry
- smart_form_builder
- themes/smart_form_theme
- utils/decoration_builder
- widgets/checkbox_field_widget
- widgets/color_picker_field_widget
- widgets/country_picker_field_widget
- widgets/date_picker_field_widget
- widgets/datetime_picker_field_widget
- widgets/dropdown_field_widget
- widgets/email_field_widget
- widgets/file_upload_field_widget
- widgets/image_upload_field_widget
- widgets/multi_select_dropdown_field_widget
- widgets/multiline_text_field_widget
- widgets/password_field_widget
- widgets/phone_field_widget
- widgets/radio_group_field_widget
- widgets/rating_field_widget
- widgets/signature_pad_field_widget
- widgets/slider_field_widget
- widgets/state_city_picker_field_widget
- widgets/stepper_number_field_widget
- widgets/switch_field_widget
- widgets/text_field_widget
- widgets/time_picker_field_widget
- widgets/url_input_field_widget