smart_form_builder 1.0.2 copy "smart_form_builder: ^1.0.2" to clipboard
smart_form_builder: ^1.0.2 copied to clipboard

A powerful, extensible Flutter SDK for building dynamic forms from JSON schema, supporting localization, theming, plugins, RTL, and advanced validation. Easily render multi-step forms, custom field ty [...]

πŸ“¦ smart_form_builder #

Pub Version Pub Likes Pub Points Popularity Pub Downloads GitHub Stars GitHub Downloads License 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

2
likes
110
points
47
downloads

Publisher

verified publishersdkwala.com

Weekly Downloads

A powerful, extensible Flutter SDK for building dynamic forms from JSON schema, supporting localization, theming, plugins, RTL, and advanced validation. Easily render multi-step forms, custom field types, and conditional logic in any Flutter app.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

collection, country_picker, file_picker, flutter, flutter_quill, highlight, image_picker, intl, signature

More

Packages that depend on smart_form_builder