|
1 | | -# example |
| 1 | +# Flutter Form Builder Example |
2 | 2 |
|
3 | | -Example app for flutter_form_builder package |
| 3 | +A comprehensive example application demonstrating the capabilities of the [Flutter Form Builder](https://pub.dev/packages/flutter_form_builder) package. |
| 4 | + |
| 5 | +## Features Demonstrated |
| 6 | + |
| 7 | +This example showcases various form building patterns and use cases: |
| 8 | + |
| 9 | +- **Complete Form** - A full-featured form with all available input types |
| 10 | +- **Sign Up Form** - A practical sign-up form example |
| 11 | +- **Dynamic Fields** - Forms with fields that can be added/removed at runtime |
| 12 | +- **Conditional Fields** - Fields that show/hide based on other field values |
| 13 | +- **Related Fields** - Forms with interdependent field values |
| 14 | +- **Grouped Radio/Checkbox** - Selection inputs with grouping |
| 15 | +- **Decorated Radio/Checkbox** - Custom styling for selection fields |
| 16 | +- **Custom Fields** - Examples of creating custom form fields |
4 | 17 |
|
5 | 18 | ## Getting Started |
6 | 19 |
|
7 | | -This project is a starting point for a Flutter application. |
| 20 | +### Installation |
| 21 | + |
| 22 | +1. Navigate to the example directory: |
| 23 | + |
| 24 | + ```bash |
| 25 | + cd example |
| 26 | + ``` |
| 27 | + |
| 28 | +2. Get dependencies: |
| 29 | + |
| 30 | + ```bash |
| 31 | + flutter pub get |
| 32 | + ``` |
| 33 | + |
| 34 | +3. Run the example: |
| 35 | + |
| 36 | + ```bash |
| 37 | + flutter run |
| 38 | + ``` |
| 39 | + |
| 40 | +## Project Structure |
| 41 | + |
| 42 | +```txt |
| 43 | +lib/ |
| 44 | +├── main.dart # App entry point with navigation |
| 45 | +├── code_page.dart # Shows source code for examples |
| 46 | +├── sources/ |
| 47 | +│ ├── complete_form.dart # All field types demo |
| 48 | +│ ├── signup_form.dart # Sign up form |
| 49 | +│ ├── dynamic_fields.dart # Dynamic field management |
| 50 | +│ ├── conditional_fields.dart # Conditional visibility |
| 51 | +│ ├── related_fields.dart # Field dependencies |
| 52 | +│ ├── grouped_radio_checkbox.dart # Grouped selections |
| 53 | +│ ├── decorated_radio_checkbox.dart # Styled selections |
| 54 | +│ └── custom_fields.dart # Custom field implementations |
| 55 | +``` |
| 56 | + |
| 57 | +## Learning Resources |
| 58 | + |
| 59 | +Each example demonstrates specific Flutter Form Builder features: |
| 60 | + |
| 61 | +- Form creation and management |
| 62 | +- Field validation |
| 63 | +- Value collection and transformation |
| 64 | +- Dynamic field operations |
| 65 | +- Conditional rendering |
8 | 66 |
|
9 | | -A few resources to get you started if this is your first Flutter project: |
| 67 | +Explore each example to understand how to implement similar patterns in your own applications. |
10 | 68 |
|
11 | | -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) |
12 | | -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) |
| 69 | +## Related Resources |
13 | 70 |
|
14 | | -For help getting started with Flutter, view our |
15 | | -[online documentation](https://flutter.dev/docs), which offers tutorials, |
16 | | -samples, guidance on mobile development, and a full API reference. |
| 71 | +- [Flutter Form Builder Documentation](https://pub.dev/packages/flutter_form_builder) |
| 72 | +- [Form Builder Validators](https://pub.dev/packages/form_builder_validators) |
| 73 | +- [Flutter Documentation](https://docs.flutter.dev/) |
0 commit comments