dart_ng_forms 0.2.3 copy "dart_ng_forms: ^0.2.3" to clipboard
dart_ng_forms: ^0.2.3 copied to clipboard

Reactive Forms architecture in Flutter inspired by Angular's FormGroup/FormControl pattern and integration with TextEditingController.

dart_ng_forms #

Reactive Forms architecture in Flutter, heavily inspired by Angular's FormGroup/FormControl pattern, with a focus on type safety, reusability, and seamless integration with Flutter's TextEditingController.

Features #

  • βš™οΈ Strongly typed FormControl<T, V> and FormGroup<T> system
  • πŸ”„ Two-way binding with TextEditingController
  • βœ… Built-in validation support
  • πŸ“¦ Reusable and composable control logic
  • πŸ“Š Observability through ChangeNotifier

Getting Started #

Add the dependency in your pubspec.yaml:

dependencies:
  dart_ng_forms: ^0.1.0

Import the package:

import 'package:dart_ng_forms/dart_ng_forms.dart';

Example #

final loginForm = LoginFormGroup({{
  'email': FormControl.text(initialValue: ''),
  'password': FormControl.text(initialValue: ''),
}});

if (loginForm.valid) {{
  var data = loginForm.value;
}}

πŸ”§ Example #

You can find a complete working example in example/main.dart.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
0
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

Reactive Forms architecture in Flutter inspired by Angular's FormGroup/FormControl pattern and integration with TextEditingController.

Homepage
Repository (GitHub)
View/report issues

Topics

#form #state-management #validation #flutter #reactive-forms

License

unknown (license)

Dependencies

flutter, result_dart

More

Packages that depend on dart_ng_forms