Package selection guidance compiled from public package information, community data, and project usage.
Easy Formz is a Flutter package designed to simplify form handling by providing a streamlined approach to form generation and validation. It reduces boilerplate code and enhances developer productivity with intuitive APIs for managing form states, validation rules, and submission logic. Built with Dart, it integrates seamlessly into Flutter applications across multiple platforms, including Android, iOS, Web, macOS, Windows, and Linux. The package promotes clean, maintainable code by leveraging immutable data structures and reactive patterns. It's particularly useful for developers aiming to build robust, scalable forms with minimal effort.
Use cases
Form creation with minimal boilerplate
Reactive form state management
Cross-platform form implementation
Complex validation logic handling
Streamlined form submission workflows
Key features
Immutable form states
Built-in validation utilities
Reactive form updates
Support for custom validators
Easy integration with Flutter widgets
Suitable for
Developers building complex forms
Teams prioritizing code maintainability
Projects requiring cross-platform form consistency
Applications with strict validation needs
Flutter beginners learning form handling
Considerations
Requires understanding of reactive programming concepts
May need additional setup for advanced validation scenarios
Best suited for projects using state management solutions like Bloc or Provider
Limited documentation beyond basic examples
Not ideal for very simple one-off forms
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
EasyFormz Package
The purpose of this package is to facilitate the creation of dynamic forms based on data received from the server. The package provides several basic components, including form types such as 'input', 'textarea', 'dropdown', 'checkbox', 'multicheckbox', 'radio', 'date', and 'time'. Additionally, users have the flexibility to create custom forms if none of the predefined form types suit their needs.
Let's say you have a list of form page then you can do like the following example:
final formPages = [
FormPage(
id: 'gweorj29',
label: 'Example Page 1',
description: 'This form displays all the existing forms available',
formConfigs: forms1,
),
FormPage(
id: 'gweorj29',
label: 'Example Page 2',
description: 'This form displays all the existing forms available',
formConfigs: forms2,
),
];
To create a custom form component based on the form configuration using the customBuilder, consider the following example:
EasyFormz(
controller: controller,
customBuilder: (config, onValueChanged) {
if (config.type == 'custom_form') {
// Customize and return the specific custom form component based on the condition.returnCustomDropdown(
config: config,
onChanged: (value) => onValueChanged(value),
);
}
},
);
Custom Error Component Builder
Custom error component is available by using the errorBuilder, consider the following example:
To personalize the appearance of the dynamic form, you can modify the theme settings using the theme parameter. Below is an example of customizing the theme for a EasyFormz: