[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9329":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},9329,"flutter_form_builder","flutter-form-builder-ecosystem\u002Fflutter_form_builder","flutter-form-builder-ecosystem","Simple form maker for Flutter Framework","https:\u002F\u002Fpub.dev\u002Fpackages\u002Fflutter_form_builder",null,"Dart",1604,558,22,47,0,1,21.24,"MIT License",false,"main",true,[24,25,26,27,28,29,30],"dart","dartlang","flutter","flutter-form-builder","flutter-package","form-validation","forms","2026-06-12 02:02:06","# Flutter Form Builder\n\nThis package helps in creation of data collection forms in Flutter by removing the boilerplate needed to build a form, validate fields, react to changes and collect final user input.\n\nAlso included are common ready-made form input fields for FormBuilder. This gives you a convenient way of adding common ready-made input fields instead of creating your own FormBuilderField from scratch.\n\n[![Pub Version](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fflutter_form_builder?logo=flutter&style=for-the-badge)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fflutter_form_builder)\n[![GitHub Workflow Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fbase.yaml?branch=main&logo=github&style=for-the-badge)](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Factions\u002Fworkflows\u002Fbase.yaml)\n[![Codecov](https:\u002F\u002Fimg.shields.io\u002Fcodecov\u002Fc\u002Fgithub\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder?logo=codecov&style=for-the-badge)](https:\u002F\u002Fapp.codecov.io\u002Fgh\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder)\n[![CodeFactor Grade](https:\u002F\u002Fimg.shields.io\u002Fcodefactor\u002Fgrade\u002Fgithub\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder?logo=codefactor&style=for-the-badge)](https:\u002F\u002Fwww.codefactor.io\u002Frepository\u002Fgithub\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder)\n\n---\n\n## Call for Maintainers\n\n> We are looking for maintainers to contribute to the development and maintenance of Flutter Form Builder Ecosystem. Is very important to keep the project alive and growing, so we need your help to keep it up to date and with new features. You can contribute in many ways, we describe some of them in [Support](#support) section.\n\n- [Features](#features)\n- [Inputs](#inputs)\n  - [Parameters](#parameters)\n- [Use](#use)\n  - [Setup](#setup)\n  - [Basic use](#basic-use)\n  - [Specific uses](#specific-uses)\n    - [Validate and get values](#validate-and-get-values)\n    - [Building your own custom field](#building-your-own-custom-field)\n    - [Programmatically changing field value](#programmatically-changing-field-value)\n    - [Programmatically inducing an error](#programmatically-inducing-an-error)\n    - [Conditional validation](#conditional-validation)\n    - [Implement reset, clear or other button into field](#implement-reset-clear-or-other-button-into-field)\n- [Support](#support)\n  - [Contribute](#contribute)\n  - [Questions and answers](#questions-and-answers)\n  - [Donations](#donations)\n- [Roadmap](#roadmap)\n- [Ecosystem](#ecosystem)\n- [Thanks to](#thanks-to)\n\n## Features\n\n- Create a form with several type of inputs\n- Get values from form by easy way\n- Apply validators to inputs fields\n- React to form fields changes and validations\n\n| Complete Form                                                                                                                                                 | Sign Up                                                                                                                                             | Dynamic Fields                                                                                                                                                | Conditional Form                                                                                                                                                      |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ![Gif demostration with all fields](https:\u002F\u002Fraw.githubusercontent.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fmain\u002Fscreenshots\u002Fcomplete_form.gif) | ![Gif demostration sign up form](https:\u002F\u002Fraw.githubusercontent.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fmain\u002Fscreenshots\u002Fsignup.gif) | ![Gif demostration dynamic fields](https:\u002F\u002Fraw.githubusercontent.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fmain\u002Fscreenshots\u002Fdynamic_fields.gif) | ![Gif demostration conditional fields](https:\u002F\u002Fraw.githubusercontent.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fmain\u002Fscreenshots\u002Fconditional_fields.gif) |\n\n## Inputs\n\nThe currently supported fields include:\n\n- `FormBuilderCheckbox` - Single checkbox field\n- `FormBuilderCheckboxGroup` - List of checkboxes for multiple selection\n- `FormBuilderChoiceChip` - Creates a chip that acts like a radio button.\n- `FormBuilderDateRangePicker` - For selection of a range of dates\n- `FormBuilderDateTimePicker` - For `Date`, `Time` and `DateTime` input\n- `FormBuilderDropdown` - Used to select one value from a list as a Dropdown\n- `FormBuilderFilterChip` - Creates a chip that acts like a checkbox\n- `FormBuilderRadioGroup` - Used to select one value from a list of Radio Widgets\n- `FormBuilderRangeSlider` - Used to select a range from a range of values\n- `FormBuilderSlider` - For selection of a numerical value on a slider\n- `FormBuilderSwitch` - On\u002FOff switch field\n- `FormBuilderTextField` - A Material Design text field input\n\n### Parameters\n\nIn order to create an input field in the form, along with the label, and any applicable validation, there are several attributes that are supported by all types of inputs namely:\n\n| Attribute          | Type                    | Default             | Required | Description                                                                                                                               |\n| ------------------ | ----------------------- | ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| `name`             | `String`                |                     | `Yes`    | This will form the key in the form value Map                                                                                              |\n| `initialValue`     | `T`                     | `null`              | `No`     | The initial value of the input field                                                                                                      |\n| `enabled`          | `bool`                  | `true`              | `No`     | Determines whether the field widget will accept user input.                                                                               |\n| `decoration`       | `InputDecoration`       | `InputDecoration()` | `No`     | Defines the border, labels, icons, and styles used to decorate the field.                                                                 |\n| `validator`        | `FormFieldValidator\u003CT>` | `null`              | `No`     | A `FormFieldValidator` that will check the validity of value in the `FormField`                                                           |\n| `onChanged`        | `ValueChanged\u003CT>`       | `null`              | `No`     | This event function will fire immediately the the field value changes                                                                     |\n| `valueTransformer` | `ValueTransformer\u003CT>`   | `null`              | `No`     | Function that transforms field value before saving to form value. e.g. transform TextField value for numeric field from `String` to `num` |\n\nThe rest of the attributes will be determined by the type of Widget being used.\n\n## Use\n\n### Setup\n\nNo specific setup required: only install the dependency and use :)\n\n### Basic use\n\n```dart\nfinal _formKey = GlobalKey\u003CFormBuilderState>();\n\nFormBuilder(\n    key: _formKey,\n    child:  FormBuilderTextField(\n        name: 'text',\n        onChanged: (val) {\n            print(val); \u002F\u002F Print the text value write into TextField\n        },\n    ),\n)\n```\n\nSee [pub.dev example tab](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fflutter_form_builder\u002Fexample) or [github code](example\u002Flib\u002Fmain.dart) for more details\n\n### Specific uses\n\n#### Validate and get values\n\nNote: Validators are in a separate package\n([form_builder_validators](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fform_builder_validators)).\n\n```dart\nfinal _formKey = GlobalKey\u003CFormBuilderState>();\n\nFormBuilder(\n  key: _formKey,\n  child: Column(\n    children: [\n      FormBuilderTextField(\n        key: _emailFieldKey,\n        name: 'email',\n        decoration: const InputDecoration(labelText: 'Email'),\n        validator: FormBuilderValidators.compose([\n          FormBuilderValidators.required(),\n          FormBuilderValidators.email(),\n        ]),\n      ),\n      const SizedBox(height: 10),\n      FormBuilderTextField(\n        name: 'password',\n        decoration: const InputDecoration(labelText: 'Password'),\n        obscureText: true,\n        validator: FormBuilderValidators.compose([\n          FormBuilderValidators.required(),\n        ]),\n      ),\n      MaterialButton(\n        color: Theme.of(context).colorScheme.secondary,\n        onPressed: () {\n          \u002F\u002F Validate and save the form values\n          _formKey.currentState?.saveAndValidate();\n          debugPrint(_formKey.currentState?.value.toString());\n\n          \u002F\u002F On another side, can access all field values without saving form with instantValues\n          _formKey.currentState?.validate();\n          debugPrint(_formKey.currentState?.instantValue.toString());\n        },\n        child: const Text('Login'),\n      )\n    ],\n  ),\n),\n```\n\n#### Building your own custom field\n\nTo build your own field within a `FormBuilder`, we use `FormBuilderField` which will require that you define your own field.\n\n```dart\nvar options = [\"Option 1\", \"Option 2\", \"Option 3\"];\n```\n\n```dart\nFormBuilderField(\n  name: \"name\",\n  validator: FormBuilderValidators.compose([\n    FormBuilderValidators.required(),\n  ]),\n  builder: (FormFieldState\u003Cdynamic> field) {\n    return InputDecorator(\n      decoration: InputDecoration(\n        labelText: \"Select option\",\n        contentPadding:\n            EdgeInsets.only(top: 10.0, bottom: 0.0),\n        border: InputBorder.none,\n        errorText: field.errorText,\n      ),\n      child: Container(\n        height: 200,\n        child: CupertinoPicker(\n          itemExtent: 30,\n          children: options.map((c) => Text(c)).toList(),\n          onSelectedItemChanged: (index) {\n            field.didChange(options[index]);\n          },\n        ),\n      ),\n    );\n  },\n),\n```\n\n#### Programmatically changing field value\n\nYou can either change the value of one field at a time like so:\n\n```dart\n_formKey.currentState.fields['color_picker'].didChange(Colors.black);\n```\n\nOr multiple fields value like so:\n\n```dart\n_formKey.currentState.patchValue({\n  'age': '50',\n  'slider': 6.7,\n  'filter_chip': ['Test 1'],\n  'choice_chip': 'Test 2',\n  'rate': 4,\n  'chips_test': [\n    Contact(\n        'Andrew',\n        'stock@man.com',\n        'https:\u002F\u002Fd2gg9evh47fn9z.cloudfront.net\u002F800px_COLOURBOX4057996.jpg',\n    ),\n  ],\n});\n```\n\n#### Programmatically inducing an error\n\n##### Using form state key or field state key\n\n```dart\nfinal _formKey = GlobalKey\u003CFormBuilderState>();\nfinal _emailFieldKey = GlobalKey\u003CFormBuilderFieldState>();\n...\nFormBuilder(\n  key: _formKey,\n  child: Column(\n    children: [\n      FormBuilderTextField(\n        key: _emailFieldKey,\n        name: 'email',\n        decoration: const InputDecoration(labelText: 'Email'),\n        validator: FormBuilderValidators.compose([\n          FormBuilderValidators.required(),\n          FormBuilderValidators.email(),\n        ]),\n      ),\n      ElevatedButton(\n        child: const Text('Submit'),\n        onPressed: () async {\n          if(await checkIfEmailExists()){\n            \u002F\u002F Either invalidate using Form Key\n            _formKey.currentState?.fields['email']?.invalidate('Email already taken');\n            \u002F\u002F OR invalidate using Field Key\n            _emailFieldKey.currentState?.invalidate('Email already taken');\n          }\n        },\n      ),\n    ],\n  ),\n),\n```\n\nWhen use `invalidate` and `validate` methods, can use two optional parameters configure the behavior\nwhen invalidate field or form, like focus or auto scroll. Take a look on method documentation for more details\n\n##### Using InputDecoration.errorText\n\nDeclare a variable to hold your error:\n\n```dart\nString _emailError;\n```\n\nUse the variable as the `errorText` within `InputDecoration`\n\n```dart\nFormBuilderTextField(\n  name: 'email',\n  decoration: InputDecoration(\n    labelText: 'Email',\n    errorText: _emailError,\n  ),\n  validator: FormBuilderValidators.compose([\n      FormBuilderValidators.required(),\n      FormBuilderValidators.email(),\n  ]),\n),\n```\n\nSet the error text\n\n```dart\nElevatedButton(\n  child: Text('Submit'),\n  onPressed: () async {\n    setState(() => _emailError = null);\n    if(await checkIfEmailExists()){\n      setState(() => _emailError = 'Email already taken.');\n    }\n  },\n),\n```\n\n#### Conditional validation\n\nYou can also validate a field based on the value of another field\n\n```dart\nFormBuilderRadioGroup(\n  decoration: InputDecoration(labelText: 'My best language'),\n  name: 'my_language',\n  validator: FormBuilderValidators.required(),\n  options: [\n    'Dart',\n    'Kotlin',\n    'Java',\n    'Swift',\n    'Objective-C',\n    'Other'\n  ]\n    .map((lang) => FormBuilderFieldOption(value: lang))\n    .toList(growable: false),\n  ),\n  FormBuilderTextField(\n    name: 'specify',\n    decoration:\n        InputDecoration(labelText: 'If Other, please specify'),\n    validator: (val) {\n      if (_formKey.currentState.fields['my_language']?.value ==\n              'Other' &&\n          (val == null || val.isEmpty)) {\n        return 'Kindly specify your language';\n      }\n      return null;\n    },\n  ),\n```\n\n#### Implement reset, clear or other button into field\n\nIf you can add some button to reset specific field, can use the `decoration` parameter like this:\n\n```dart\nList\u003CString> genderOptions = ['Male', 'Female', 'Other'];\n\nFormBuilderDropdown\u003CString>(\n  name: 'gender',\n  initialValue: 'Male',\n  decoration: InputDecoration(\n    labelText: 'Gender',\n    suffix: IconButton(\n      icon: const Icon(Icons.close),\n      onPressed: () {\n        _formKey.currentState!.fields['gender']\n            ?.reset();\n      },\n    ),\n    hintText: 'Select Gender',\n  ),\n  items: genderOptions\n      .map((gender) => DropdownMenuItem(\n            alignment: AlignmentDirectional.center,\n            value: gender,\n            child: Text(gender),\n          ))\n      .toList(),\n),\n```\n\nOr reset value like this:\n\n```dart\nclass ClearFormBuilderTextField extends StatefulWidget {\n  const ClearFormBuilderTextField({super.key});\n\n  @override\n  State\u003CClearFormBuilderTextField> createState() =>\n      _ClearFormBuilderTextFieldState();\n}\n\nclass _ClearFormBuilderTextFieldState\n    extends State\u003CClearFormBuilderTextField> {\n  final ValueNotifier\u003CString?> text = ValueNotifier\u003CString?>(null);\n  final textFieldKey = GlobalKey\u003CFormBuilderFieldState>();\n\n  @override\n  Widget build(BuildContext context) {\n    return FormBuilderTextField(\n      autovalidateMode: AutovalidateMode.always,\n      name: 'age',\n      key: textFieldKey,\n      onChanged: (value) {\n        text.value = value;\n      },\n      decoration: InputDecoration(\n        labelText: 'Age',\n        suffixIcon: ValueListenableBuilder\u003CString?>(\n          valueListenable: text,\n          child: IconButton(\n            onPressed: () => textFieldKey.currentState?.didChange(null),\n            tooltip: 'Clear',\n            icon: const Icon(Icons.clear),\n          ),\n          builder: (context, value, child) =>\n              (value?.isEmpty ?? true) ? const SizedBox() : child!,\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Migrations\n\n### v9 to v10\n\n- Remove `invalidateField` and `invalidateFirstField` methods from FormBuilderState. Use `fields[name]?.invalidate(errorText)` and `fields.first.invalidate(errorText)` instead\n- [FormBuilderTextField] Deprecate canRequestFocus property. Use `FocusNode.canRequestFocus.` instead\n- Assert on FormBuilderField.decoration.enabled property. Use FormBuilderField.enabled instead\n- Easy way! Only need execute `dart fix --apply` on your project to fix the following changes:\n  - Rename FormBuilderChoiceChip to FormBuilderChoiceChips.\n  - Rename FormBuilderFilterChip to FormBuilderFilterChips.\n  - [FormBuilderFilterChip] Remove maxChips property.\n  - [FormBuilderDateTimePicker] Remove resetIcon property.\n  - [FormBuilder] Remove onPopInvoked property.\n\n## Support\n\n### Contribute\n\nYou have some ways to contribute to this packages\n\n- Beginner: Reporting bugs or request new features\n- Intermediate: Implement new features (from issues or not) and created pull requests\n- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things\n\nSee [contribution file](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002F.github\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) for more details\n\n### Questions and answers\n\nYou can question or search answers on [Github discussion](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fdiscussions) or on [StackOverflow](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fflutter-form-builder)\n\n### Donations\n\nDonate or become a sponsor of Flutter Form Builder Ecosystem\n\n[![Become a Sponsor](https:\u002F\u002Fopencollective.com\u002Fflutter-form-builder-ecosystem\u002Ftiers\u002Fsponsor.svg?avatarHeight=56)](https:\u002F\u002Fopencollective.com\u002Fflutter-form-builder-ecosystem)\n\n## Roadmap\n\n- [Solve open issues](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fissues), [prioritizing bugs](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Flabels\u002Fbug)\n\n## Ecosystem\n\nTake a look to [our awesome ecosystem](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem) and all packages in there\n\n## Thanks to\n\n[All contributors](https:\u002F\u002Fgithub.com\u002Fflutter-form-builder-ecosystem\u002Fflutter_form_builder\u002Fgraphs\u002Fcontributors)\n","Flutter Form Builder 是一个用于 Flutter 框架的表单构建工具，旨在简化数据收集表单的创建过程。它通过移除构建、验证字段以及响应变化和收集最终用户输入所需的模板代码来提高开发效率。此外，该库提供了多种预设的表单输入组件，如文本框、选择器等，开发者可以直接使用这些组件而无需从零开始自定义。支持对表单项进行条件性验证，并允许以编程方式更改字段值或触发错误状态。此项目非常适合需要快速搭建用户界面且要求具备良好交互体验的应用场景，比如注册登录页面、问卷调查等。基于 MIT 许可证发布，拥有活跃的社区支持与贡献者维护。",2,"2026-06-11 03:22:13","top_language"]