form_engine 0.0.1+1 copy "form_engine: ^0.0.1+1" to clipboard
form_engine: ^0.0.1+1 copied to clipboard

Headless, controller-free, declarative form engine for Flutter and Dart.

form_engine #

A headless, controller-free, declarative form engine for Flutter & Dart.

form_engine helps you manage form state and validation without coupling your logic to widgets, controllers, or a specific state management solution.


โœจ Why form_engine? #

Flutter already has form libraries โ€” but most of them are:

  • Widget-first
  • Hard to unit test
  • Tightly coupled to UI
  • Difficult to use in clean architecture or enterprise apps

form_engine is different.

It is:

  • ๐Ÿง  State-first
  • ๐Ÿงฉ UI-agnostic
  • ๐Ÿงช Pure Dart core
  • ๐Ÿ— Clean-architecture friendly

๐Ÿš€ Key Features #

  • Headless form engine (no widgets required)
  • Controller-free API
  • Declarative form & field schemas
  • Composable validators
  • Centralized form state
  • Easy unit testing
  • Works with Bloc, Riverpod, MVC, or setState

๐Ÿ“ฆ Installation #

dependencies:
  form_engine: ^0.0.1

Basic Usage #

  final schema = FormSchema(
fields: {
  'email': FieldSchema<String>(
    validators: const [
      RequiredValidator(),
      EmailValidator(),
    ],
          ),
  'password': FieldSchema<String>(
    validators: const [
      RequiredValidator(),
      MinLengthValidator(6),
    ],
          ),
},
  );

Create the engine #

final form = FormEngine(schema: schema);

Update values #

form.updateValue('email', 'test@example.com');
form.updateValue('password', '123456');

Validate and read state #

form.validateAll();

form.state.values;
form.state.errors;
form.state.isValid;

3
likes
0
points
153
downloads

Publisher

unverified uploader

Weekly Downloads

Headless, controller-free, declarative form engine for Flutter and Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on form_engine