formaster 0.3.0 copy "formaster: ^0.3.0" to clipboard
formaster: ^0.3.0 copied to clipboard

Kit for create complex form

Create form easy and fast. Create fields once and use their many times

Why field is not widget #

Often, the application uses a single design forms, you once set up the topic and / or create your fields And then you write only logic in the controller

Getting started #

To use this plugin, add formaster as a dependency in your pubspec.yaml file.

Usage #

    final product = Product(); // Abstract model

    final titleField = StringField(
      placeholder: 'Title',
      onSaved: (value) => product.title = value,
    );
    final priceField = DoubleField(
      placeholder: 'Price',
      onSaved: (value) => product.price = value,
    );

    final controller = FromController;
    
    FormWidget(
        controller: controller,
        body: FormColumnLayout([
            titleField,
            priceField,
        ]);,
    ),

    if(controller.save()) {
        // Great, you model filled!
    }

see /example for more case.

Components #

Basic components that will suit most users

Layout #

  • FormColumnLayout
  • FormRowLayout
  • FormWrapLayout

Fields #

  • BoolField
  • ChoiceField
  • DoubleField
  • IntField
  • StringField

Fields used standart ThemeData and FormThemeData for additional data In /example/lib/fields you will see example of custom fields

0
likes
120
points
34
downloads

Publisher

verified publisherwhatdo.work

Weekly Downloads

Kit for create complex form

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

collection, flutter, provider

More

Packages that depend on formaster