form_gen 0.0.1-dev-01a copy "form_gen: ^0.0.1-dev-01a" to clipboard
form_gen: ^0.0.1-dev-01a copied to clipboard

Provides [Dart Build System] builder for handling Flutter Form generation for Flutter models.The builders generate code when they find *classes* and *members* annotated with classes defined in packag [...]

Form Gen #

Provides Dart Build System builder for handling Flutter Form generation for Flutter models.

The builders generate code when they find classes and members annotated with classes defined in package:flutter_form_annotations.

  • To generate a Flutter Form code for a class, annotate it with formBuilder. You can provide arguments to formBuilder to configure the generated code. You can also customize the individual fields by annotating them with one of the Field decorators, like FieldText, FieldDropdown, and providing custom arguments. See the table below for the list of Field annotaters.

  • The generated code requires that target class contains 2 methods: toJson and fromJson, as it treats the class as immutable. You may either code these methods by hand or use the json_serializable or freezed package.

Setup #

To configure your project for the latest released version of formBuilder, see the example.

Example #

Given a library profile.dart with a ```Profile`` class annotated with formBuilder. The example annotates the class with jsonSerializable as well, so you will see code generated by both the builders.

'''dart import 'package:flutter_form_annotations/flutter_form_annotations.dart';

Building creates the corresponding part ```profile.g.dart```.

```dart
part of 'profile.dart';


Features and Bugs #

Please file feature reuests and bugs @ issue tracker# flutter_form_generator

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Provides [Dart Build System] builder for handling Flutter Form generation for Flutter models.The builders generate code when they find *classes* and *members* annotated with classes defined in package flutter_form_annotations.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, dart_style, flutter_form_annotations, source_gen

More

Packages that depend on form_gen