{
    "url": "https://delaparra-services.nl/nl/skills/flutter-forms",
    "locale": "nl",
    "title": "Flutter-formulieren | DeLaParra Services",
    "description": "Een Flutter-formulier verzamelt invoer en controleert of die klaar is om te versturen.",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/flutter-forms",
        "nl": "https://delaparra-services.nl/nl/skills/flutter-forms"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/nl/skills/flutter-forms.csv",
        "md": "https://delaparra-services.nl/nl/skills/flutter-forms.md",
        "json": "https://delaparra-services.nl/nl/skills/flutter-forms.json",
        "zip": "https://delaparra-services.nl/nl/skills/flutter-forms.zip",
        "pdf": "https://delaparra-services.nl/nl/skills/flutter-forms.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/nl/skills/flutter-forms.csv",
            "encodingFormat": "text/csv",
            "name": "flutter-forms.csv"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/flutter-forms.json",
            "encodingFormat": "application/json",
            "name": "flutter-forms.json"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/flutter-forms.md",
            "encodingFormat": "text/markdown",
            "name": "flutter-forms.md"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/flutter-forms.pdf",
            "encodingFormat": "application/pdf",
            "name": "flutter-forms.pdf"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/flutter-forms.zip",
            "encodingFormat": "application/zip",
            "name": "flutter-forms.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-forms/download",
            "encodingFormat": "application/zip",
            "name": "flutter-forms-files.zip"
        }
    ],
    "markdown": "# Flutter-formulieren\n\n \n\nEen Flutter-formulier verzamelt invoer en controleert of die klaar is om te versturen.\n\n \n\n**Licentie** MIT\n\n \n\n**Bron** gabuldev/flutter-skills\n\n [Download zip](<https://delaparra-services.nl/skills/flutter-forms/download>)   \n\nYou are implementing a form for a Flutter feature.\n\n \n\n## Three Patterns by Use Case\n\n \n\nChoose based on the skill argument, if one was given, or on the context of the feature:\n\n \n\n- ` simple ` — basic form with minimal validation (settings toggle, quick input) \n- ` validated ` — full validation, field-level errors, submit-to-Cubit flow (login, product creation) \n- ` multi-step ` — form split across tabs or stepper (store config, onboarding)\n\n  \n\n## Form Architecture\n\n \n\nEvery form follows this structure:\n\n \n\n1. **StatefulWidget** — forms need mutable state for controllers and keys \n1. **GlobalKey\\<FormState\\>** — declared as a field, NEVER recreated in ` build() ` \n1. **TextEditingController per field** — initialized in ` initState() ` or inline, disposed in ` dispose() ` \n1. **Submit via ` _formKey.currentState!.validate() `** — returns true only if all validators pass\n\n \n\n```\nclass <Feature>Form extends StatefulWidget {\n  final <Entity>? initial; // null = create mode, non-null = edit mode\n  const <Feature>Form({super.key, this.initial});\n\n  @override\n  State<<Feature>Form> createState() => _<Feature>FormState();\n}\n\nclass _<Feature>FormState extends State<<Feature>Form> {\n  // CORRECT: key is a field, created once\n  final _formKey = GlobalKey<FormState>();\n  final _nameController = TextEditingController();\n\n  @override\n  void initState() {\n    super.initState();\n    if (widget.initial != null) {\n      _nameController.text = widget.initial!.name;\n    }\n  }\n\n  @override\n  void dispose() {\n    _nameController.dispose();\n    super.dispose();\n  }\n\n  // ...\n}\n```\n\n \n\n**NEVER do this:**\n\n \n\n```\n// WRONG: recreates key every build, loses form state\n@override\nWidget build(BuildContext context) {\n  final formKey = GlobalKey<FormState>(); // BUG!\n  return Form(key: formKey, child: ...);\n}\n```\n\n  \n\n## Pattern 1: Simple Form\n\n \n\nBest for: quick dialogs, single-field inputs, settings\n\n \n\n```\nclass _QuickInputDialogState extends State<QuickInputDialog> {\n  final _formKey = GlobalKey<FormState>();\n  final _controller = TextEditingController();\n\n  void _handleSubmit() {\n    if (_formKey.currentState!.validate()) {\n      widget.onSave(_controller.text);\n      Navigator.of(context).pop();\n    }\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AlertDialog(\n      title: const Text('Adicionar Item'),\n      content: Form(\n        key: _formKey,\n        child: TextFormField(\n          controller: _controller,\n          decoration: const InputDecoration(labelText: 'Nome'),\n          validator: Validators.required('Digite o nome'),\n        ),\n      ),\n      actions: [\n        TextButton(\n          onPressed: () => Navigator.pop(context),\n          child: const Text('Cancelar'),\n        ),\n        FilledButton(\n          onPressed: _handleSubmit,\n          child: const Text('Salvar'),\n        ),\n      ],\n    );\n  }\n}\n```\n\n  \n\n## Pattern 2: Validated Form + Cubit Integration\n\n \n\nBest for: login, product creation, user management\n\n \n\n**Submission flow:**\n\n \n\n```\nUser fills form -> taps submit -> _formKey.validate()\n  -> if valid -> controller.submit(data)\n  -> BlocListener shows success/error\n```\n\n \n\n**Login form example:**\n\n \n\n```\nclass LoginScreen extends StatefulWidget {\n  const LoginScreen({super.key});\n\n  @override\n  State<LoginScreen> createState() => _LoginScreenState();\n}\n\nclass _LoginScreenState extends State<LoginScreen> {\n  final _formKey = GlobalKey<FormState>();\n  final _emailController = TextEditingController();\n  final _passwordController = TextEditingController();\n  bool _obscurePassword = true;\n\n  @override\n  void dispose() {\n    _emailController.dispose();\n    _passwordController.dispose();\n    super.dispose();\n  }\n\n  void _handleSubmit() {\n    if (_formKey.currentState!.validate()) {\n      context.read<AuthController>().login(\n            email: _emailController.text.trim(),\n            password: _passwordController.text,\n          );\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return BlocListener<AuthController, AuthStatus>(\n      listener: (context, status) {\n        if (status is AuthSuccess) {\n          Navigator.pushReplacementNamed(context, '/home');\n        } else if (status is AuthFailure) {\n          ScaffoldMessenger.of(context).showSnackBar(\n            SnackBar(content: Text(status.message)),\n          );\n        }\n      },\n      child: Scaffold(\n        body: Form(\n          key: _formKey,\n          child: Padding(\n            padding: const EdgeInsets.all(24),\n            child: Column(\n              mainAxisAlignment: MainAxisAlignment.center,\n              children: [\n                TextFormField(\n                  controller: _emailController,\n                  decoration: const InputDecoration(\n                    labelText: 'E-mail',\n                    prefixIcon: Icon(Icons.email_outlined),\n                  ),\n                  keyboardType: TextInputType.emailAddress,\n                  validator: Validators.compose([\n                    Validators.required('Digite seu e-mail'),\n                    Validators.email('E-mail invalido'),\n                  ]),\n                ),\n                const SizedBox(height: 16),\n                TextFormField(\n                  controller: _passwordController,\n                  obscureText: _obscurePassword,\n                  decoration: InputDecoration(\n                    labelText: 'Senha',\n                    prefixIcon: const Icon(Icons.lock_outlined),\n                    suffixIcon: IconButton(\n                      icon: Icon(_obscurePassword\n                          ? Icons.visibility_off\n                          : Icons.visibility),\n                      onPressed: () =>\n                          setState(() => _obscurePassword = !_obscurePassword),\n                    ),\n                  ),\n                  validator: Validators.required('Digite sua senha'),\n                ),\n                const SizedBox(height: 24),\n                BlocBuilder<AuthController, AuthStatus>(\n                  builder: (context, status) {\n                    final isLoading = status is AuthLoading;\n                    return FilledButton(\n                      onPressed: isLoading ? null : _handleSubmit,\n                      child: isLoading\n                          ? const SizedBox(\n                              width: 20,\n                              height: 20,\n                              child: CircularProgressIndicator(strokeWidth: 2),\n                            )\n                          : const Text('Entrar'),\n                    );\n                  },\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n \n\n**Product creation form example (with money input and image picker):**\n\n \n\n```\nclass _ProductDialogState extends State<ProductDialog> {\n  final _formKey = GlobalKey<FormState>();\n  final _nameController = TextEditingController();\n  final _codeController = TextEditingController();\n  final _descriptionController = TextEditingController();\n  late final _priceController = MoneyMaskedTextController(\n    initialValue: widget.product?.price ?? 0,\n    leftSymbol: 'R\\$',\n    decimalSeparator: ',',\n    thousandSeparator: '.',\n    precision: 2,\n  );\n\n  Category? _selectedCategory;\n  final List<XFile> _newImages = [];\n  List<String> _existingImages = [];\n\n  @override\n  void initState() {\n    super.initState();\n    if (widget.product != null) {\n      _nameController.text = widget.product!.name;\n      _codeController.text = widget.product!.code.toString();\n      _descriptionController.text = widget.product!.description;\n      _selectedCategory = widget.product!.category;\n      _existingImages = List.from(widget.product!.images);\n    }\n  }\n\n  @override\n  void dispose() {\n    _nameController.dispose();\n    _codeController.dispose();\n    _descriptionController.dispose();\n    _priceController.dispose();\n    super.dispose();\n  }\n\n  Future<void> _pickImages() async {\n    final picker = ImagePicker();\n    final images = await picker.pickMultiImage();\n    if (images.isNotEmpty) {\n      setState(() => _newImages.addAll(images));\n    }\n  }\n\n  void _handleSubmit() {\n    if (_formKey.currentState!.validate()) {\n      final product = Product(\n        id: widget.product?.id ?? '',\n        name: _nameController.text,\n        code: int.tryParse(_codeController.text) ?? 0,\n        price: _priceController.numberValue,\n        description: _descriptionController.text,\n        category: _selectedCategory!,\n        images: _existingImages,\n      );\n      widget.onSave(product, _newImages);\n      Navigator.of(context).pop();\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AlertDialog(\n      title: Text(widget.product == null ? 'Novo Produto' : 'Editar Produto'),\n      content: Form(\n        key: _formKey,\n        child: SingleChildScrollView(\n          child: Column(\n            mainAxisSize: MainAxisSize.min,\n            children: [\n              TextFormField(\n                controller: _nameController,\n                decoration: const InputDecoration(labelText: 'Nome do Produto'),\n                validator: Validators.required('Digite o nome do produto'),\n              ),\n              const SizedBox(height: 16),\n              TextFormField(\n                controller: _priceController,\n                decoration: const InputDecoration(labelText: 'Preco'),\n                keyboardType: TextInputType.number,\n                validator: Validators.minValue(0.01, 'Preco deve ser maior que zero'),\n              ),\n              const SizedBox(height: 16),\n              DropdownButtonFormField<Category>(\n                value: _selectedCategory,\n                decoration: const InputDecoration(labelText: 'Categoria'),\n                items: widget.categories\n                    .map((c) => DropdownMenuItem(value: c, child: Text(c.name)))\n                    .toList(),\n                onChanged: (value) => setState(() => _selectedCategory = value),\n                validator: (value) =>\n                    value == null ? 'Selecione uma categoria' : null,\n              ),\n              const SizedBox(height: 16),\n              TextFormField(\n                controller: _descriptionController,\n                decoration: const InputDecoration(labelText: 'Descricao'),\n                maxLines: 3,\n              ),\n              const SizedBox(height: 16),\n              // Image picker section\n              Wrap(\n                spacing: 8,\n                children: [\n                  ..._existingImages.map((url) => _ImageTile(\n                        imageUrl: url,\n                        onRemove: () => setState(\n                            () => _existingImages.remove(url)),\n                      )),\n                  IconButton.filled(\n                    onPressed: _pickImages,\n                    icon: const Icon(Icons.add_a_photo),\n                  ),\n                ],\n              ),\n            ],\n          ),\n        ),\n      ),\n      actions: [\n        TextButton(\n          onPressed: () => Navigator.pop(context),\n          child: const Text('Cancelar'),\n        ),\n        FilledButton(\n          onPressed: _handleSubmit,\n          child: const Text('Salvar'),\n        ),\n      ],\n    );\n  }\n}\n```\n\n  \n\n## Pattern 3: Multi-Step Form (TabBarView)\n\n \n\nBest for: store configuration, onboarding, complex entity creation\n\n \n\nUse ` AutomaticKeepAliveClientMixin ` to preserve form state when switching tabs.\n\n \n\n```\nclass StoreConfigScreen extends StatefulWidget {\n  const StoreConfigScreen({super.key});\n\n  @override\n  State<StoreConfigScreen> createState() => _StoreConfigScreenState();\n}\n\nclass _StoreConfigScreenState extends State<StoreConfigScreen>\n    with SingleTickerProviderStateMixin {\n  late final TabController _tabController;\n\n  // One form key per tab — each tab validates independently\n  final _infoFormKey = GlobalKey<FormState>();\n  final _hoursFormKey = GlobalKey<FormState>();\n  final _paymentFormKey = GlobalKey<FormState>();\n\n  final _storeNameController = TextEditingController();\n  final _phoneController = TextEditingController();\n\n  @override\n  void initState() {\n    super.initState();\n    _tabController = TabController(length: 3, vsync: this);\n  }\n\n  @override\n  void dispose() {\n    _tabController.dispose();\n    _storeNameController.dispose();\n    _phoneController.dispose();\n    super.dispose();\n  }\n\n  bool _validateAllTabs() {\n    final infoValid = _infoFormKey.currentState?.validate() ?? false;\n    final hoursValid = _hoursFormKey.currentState?.validate() ?? false;\n    final paymentValid = _paymentFormKey.currentState?.validate() ?? false;\n\n    if (!infoValid) _tabController.animateTo(0);\n    else if (!hoursValid) _tabController.animateTo(1);\n    else if (!paymentValid) _tabController.animateTo(2);\n\n    return infoValid && hoursValid && paymentValid;\n  }\n\n  void _handleSubmit() {\n    if (_validateAllTabs()) {\n      context.read<StoreConfigController>().save(/* collected data */);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('Configuracoes da Loja'),\n        bottom: TabBar(\n          controller: _tabController,\n          tabs: const [\n            Tab(text: 'Informacoes'),\n            Tab(text: 'Horarios'),\n            Tab(text: 'Pagamento'),\n          ],\n        ),\n      ),\n      body: TabBarView(\n        controller: _tabController,\n        children: [\n          _StoreInfoTab(formKey: _infoFormKey, nameController: _storeNameController),\n          _StoreHoursTab(formKey: _hoursFormKey),\n          _PaymentConfigTab(formKey: _paymentFormKey),\n        ],\n      ),\n      floatingActionButton: FloatingActionButton.extended(\n        onPressed: _handleSubmit,\n        label: const Text('Salvar'),\n        icon: const Icon(Icons.save),\n      ),\n    );\n  }\n}\n\n/// Each tab uses AutomaticKeepAliveClientMixin to preserve state\nclass _StoreInfoTab extends StatefulWidget {\n  final GlobalKey<FormState> formKey;\n  final TextEditingController nameController;\n\n  const _StoreInfoTab({required this.formKey, required this.nameController});\n\n  @override\n  State<_StoreInfoTab> createState() => _StoreInfoTabState();\n}\n\nclass _StoreInfoTabState extends State<_StoreInfoTab>\n    with AutomaticKeepAliveClientMixin {\n  @override\n  bool get wantKeepAlive => true;\n\n  @override\n  Widget build(BuildContext context) {\n    super.build(context); // Required by AutomaticKeepAliveClientMixin\n    return Form(\n      key: widget.formKey,\n      child: ListView(\n        padding: const EdgeInsets.all(16),\n        children: [\n          TextFormField(\n            controller: widget.nameController,\n            decoration: const InputDecoration(labelText: 'Nome da Loja'),\n            validator: Validators.required('Digite o nome da loja'),\n          ),\n          // ... more fields\n        ],\n      ),\n    );\n  }\n}\n```\n\n  \n\n## Reusable Validators\n\n \n\nCreate a utility class in ` core/shared/validators.dart `. Each validator is a function that returns a ` FormFieldValidator<String> ` (i.e., ` String? Function(String?) `).\n\n \n\n```\n/// core/shared/validators.dart\nclass Validators {\n  Validators._();\n\n  /// Composes multiple validators — runs in order, returns first error\n  static FormFieldValidator<String> compose(\n      List<FormFieldValidator<String>> validators) {\n    return (value) {\n      for (final validator in validators) {\n        final error = validator(value);\n        if (error != null) return error;\n      }\n      return null;\n    };\n  }\n\n  /// Field must not be empty\n  static FormFieldValidator<String> required(String message) {\n    return (value) =>\n        (value == null || value.trim().isEmpty) ? message : null;\n  }\n\n  /// Valid email format\n  static FormFieldValidator<String> email(String message) {\n    return (value) {\n      if (value == null || value.isEmpty) return null; // use with required()\n      final regex = RegExp(r'^[\\w\\.\\-]+@[\\w\\.\\-]+\\.\\w{2,}$');\n      return regex.hasMatch(value) ? null : message;\n    };\n  }\n\n  /// Minimum character length\n  static FormFieldValidator<String> minLength(int min, String message) {\n    return (value) =>\n        (value != null && value.length < min) ? message : null;\n  }\n\n  /// Maximum character length\n  static FormFieldValidator<String> maxLength(int max, String message) {\n    return (value) =>\n        (value != null && value.length > max) ? message : null;\n  }\n\n  /// Numeric value only\n  static FormFieldValidator<String> numeric(String message) {\n    return (value) {\n      if (value == null || value.isEmpty) return null;\n      return double.tryParse(value) == null ? message : null;\n    };\n  }\n\n  /// Minimum numeric value (for MoneyMaskedTextController fields)\n  static FormFieldValidator<String> minValue(\n      double min, String message) {\n    return (value) {\n      if (value == null || value.isEmpty) return null;\n      final cleaned =\n          value.replaceAll('R\\$', '').replaceAll('.', '').replaceAll(',', '.');\n      final number = double.tryParse(cleaned.trim());\n      return (number == null || number < min) ? message : null;\n    };\n  }\n\n  /// Password strength: min 6 chars\n  static FormFieldValidator<String> password(String message) {\n    return (value) =>\n        (value != null && value.length < 6) ? message : null;\n  }\n\n  /// Matches another field (password confirmation)\n  static FormFieldValidator<String> matches(\n      TextEditingController other, String message) {\n    return (value) => (value != other.text) ? message : null;\n  }\n}\n```\n\n \n\n**Usage with compose:**\n\n \n\n```\nTextFormField(\n  validator: Validators.compose([\n    Validators.required('Campo obrigatorio'),\n    Validators.email('E-mail invalido'),\n  ]),\n),\n```\n\n  \n\n## Field Type Reference\n\n \n\n### TextFormField (standard)\n\n \n\n```\nTextFormField(\n  controller: _controller,\n  decoration: const InputDecoration(labelText: 'Nome'),\n  validator: Validators.required('Campo obrigatorio'),\n)\n```\n\n \n\n### DropdownButtonFormField\n\n \n\n```\nDropdownButtonFormField<Category>(\n  value: _selectedCategory,\n  decoration: const InputDecoration(labelText: 'Categoria'),\n  items: categories\n      .map((c) => DropdownMenuItem(value: c, child: Text(c.name)))\n      .toList(),\n  onChanged: (value) => setState(() => _selectedCategory = value),\n  validator: (value) => value == null ? 'Selecione uma categoria' : null,\n)\n```\n\n \n\n### Money Input (Brazilian Real)\n\n \n\nUses ` flutter_masked_text3 ` package, which is already a dependency in the project.\n\n \n\n```\nlate final _priceController = MoneyMaskedTextController(\n  initialValue: widget.product?.price ?? 0,\n  leftSymbol: 'R\\$',\n  decimalSeparator: ',',\n  thousandSeparator: '.',\n  precision: 2,\n);\n\n// In form:\nTextFormField(\n  controller: _priceController,\n  decoration: const InputDecoration(labelText: 'Preco'),\n  keyboardType: TextInputType.number,\n  validator: Validators.minValue(0.01, 'Preco deve ser maior que zero'),\n)\n\n// Reading the value:\nfinal double price = _priceController.numberValue;\n```\n\n \n\n### Password Field with Obscure Toggle\n\n \n\n```\nbool _obscurePassword = true;\n\nTextFormField(\n  controller: _passwordController,\n  obscureText: _obscurePassword,\n  decoration: InputDecoration(\n    labelText: 'Senha',\n    prefixIcon: const Icon(Icons.lock_outlined),\n    suffixIcon: IconButton(\n      icon: Icon(\n          _obscurePassword ? Icons.visibility_off : Icons.visibility),\n      onPressed: () =>\n          setState(() => _obscurePassword = !_obscurePassword),\n    ),\n  ),\n  validator: Validators.compose([\n    Validators.required('Digite sua senha'),\n    Validators.password('Senha deve ter no minimo 6 caracteres'),\n  ]),\n)\n```\n\n \n\n### Password Confirmation\n\n \n\n```\nTextFormField(\n  controller: _confirmPasswordController,\n  obscureText: true,\n  decoration: const InputDecoration(labelText: 'Confirmar Senha'),\n  validator: Validators.compose([\n    Validators.required('Confirme sua senha'),\n    Validators.matches(_passwordController, 'As senhas nao coincidem'),\n  ]),\n)\n```\n\n \n\n### Date Picker Field\n\n \n\n```\nDateTime? _selectedDate;\n\nFormField<DateTime>(\n  initialValue: _selectedDate,\n  validator: (value) => value == null ? 'Selecione uma data' : null,\n  builder: (field) {\n    return InkWell(\n      onTap: () async {\n        final picked = await showDatePicker(\n          context: context,\n          initialDate: _selectedDate ?? DateTime.now(),\n          firstDate: DateTime(2020),\n          lastDate: DateTime(2030),\n        );\n        if (picked != null) {\n          setState(() => _selectedDate = picked);\n          field.didChange(picked);\n        }\n      },\n      child: InputDecorator(\n        decoration: InputDecoration(\n          labelText: 'Data',\n          errorText: field.errorText,\n        ),\n        child: Text(\n          _selectedDate != null\n              ? '${_selectedDate!.day}/${_selectedDate!.month}/${_selectedDate!.year}'\n              : 'Selecione',\n        ),\n      ),\n    );\n  },\n)\n```\n\n \n\n### Image Picker (Product Photos)\n\n \n\n```\nfinal List<XFile> _newImages = [];\nList<String> _existingImages = [];\n\nFuture<void> _pickImages() async {\n  if (_existingImages.length + _newImages.length >= 5) {\n    ScaffoldMessenger.of(context).showSnackBar(\n      const SnackBar(content: Text('Maximo de 5 imagens permitido.')),\n    );\n    return;\n  }\n  final picker = ImagePicker();\n  final images = await picker.pickMultiImage();\n  if (images.isNotEmpty) {\n    setState(() {\n      final totalAllowed = 5 - _existingImages.length - _newImages.length;\n      _newImages.addAll(images.take(totalAllowed));\n    });\n  }\n}\n```\n\n  \n\n## Form + Cubit Integration Rules\n\n \n\n1. **Form collects data, controller processes it** — the form widget builds the entity/DTO, then calls ` controller.submit(data) ` \n1. **Use ` BlocListener ` for side effects** — navigation, snackbar, dialog. Never navigate inside ` BlocBuilder ` \n1. **Use ` BlocBuilder ` only for the submit button** — to show loading spinner and disable the button \n1. **Controller emits Loading before async work, Success or Failure after** — see ` /flutter-state ` skill \n1. **In dialogs**: call ` widget.onSave(entity) ` callback instead of using a controller directly, since the parent screen owns the controller\n\n \n\n```\n// Screen owns the controller and reacts to state\nBlocListener<MenuController, MenuStatus>(\n  listener: (context, status) {\n    if (status is MenuSuccess) {\n      ScaffoldMessenger.of(context).showSnackBar(\n        const SnackBar(content: Text('Produto salvo com sucesso!')),\n      );\n    } else if (status is MenuFailure) {\n      ScaffoldMessenger.of(context).showSnackBar(\n        SnackBar(content: Text(status.message)),\n      );\n    }\n  },\n  child: /* form widget */,\n),\n```\n\n  \n\n## Instructions\n\n \n\n1. Read the existing screen/dialog if one already exists in the module \n1. Choose the right pattern (` simple `, ` validated `, ` multi-step `) based on the form's complexity \n1. If a ` Validators ` class does not yet exist in ` core/shared/ `, create one \n1. Use ` MoneyMaskedTextController ` from ` flutter_masked_text3 ` for any price/currency fields \n1. Always dispose all controllers in ` dispose() ` \n1. Never recreate ` GlobalKey<FormState> ` inside ` build() ` — always declare as a class field \n1. For forms inside ` TabBarView `, use ` AutomaticKeepAliveClientMixin ` \n1. Connect form submission to the module's controller following the ` /flutter-state ` skill patterns \n1. Use Portuguese strings for user-facing validation messages (e.g., \"Campo obrigatorio\")\n\n \n\n## Bestanden\n\n \n\n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md `\n\n \n\n## Gerelateerde termen\n\n \n\n- [Flutter-formulieren](<https://delaparra-services.nl/nl/kennisbank/flutter-forms>)\n\n \n\n## Gerelateerde diensten\n\n \n\n- [App-ontwikkeling](<https://delaparra-services.nl/nl/services#service-02>)\n\n \n\n[Een skill installeren in je AI-assistent](<https://delaparra-services.nl/nl/handleidingen/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/nl/skills/flutter-forms)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Maatwerk software, webapplicaties en mobiele apps, ontwikkeld in Laravel door één ontwikkelaar in Groningen. Vaste prijs vooraf, volledige broncode bij oplevering.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, Nederland",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Webdesign en -ontwikkeling",
                    "App-ontwikkeling",
                    "Maatwerk software en webapplicaties",
                    "OpenSpec",
                    "Beoordeling van AI-code",
                    "Je eigen programmeeragent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#webpage",
                "url": "https://delaparra-services.nl/nl/skills/flutter-forms",
                "name": "Flutter-formulieren | DeLaParra Services",
                "description": "Een Flutter-formulier verzamelt invoer en controleert of die klaar is om te versturen.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "nl",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/nl"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Flutter-formulieren"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#skill",
                "url": "https://delaparra-services.nl/nl/skills/flutter-forms",
                "name": "Flutter-formulieren",
                "description": "Een Flutter-formulier verzamelt invoer en controleert of die klaar is om te versturen.",
                "inLanguage": "nl",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#dataset",
                "name": "Flutter-formulieren",
                "description": "Een Flutter-formulier verzamelt invoer en controleert of die klaar is om te versturen.",
                "url": "https://delaparra-services.nl/nl/skills/flutter-forms",
                "identifier": "https://delaparra-services.nl/nl/skills/flutter-forms#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/nl/skills/flutter-forms#skill"
                },
                "creditText": "gabuldev/flutter-skills",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "nl",
                "dateModified": "2026-11-30T13:17:19+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/nl/kennisbank#skills",
                    "name": "Skills voor AI-programmeerassistenten",
                    "url": "https://delaparra-services.nl/nl/kennisbank"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/nl/kennisbank#catalog",
                    "name": "Datacatalogus van de kennisbank",
                    "url": "https://delaparra-services.nl/nl/kennisbank"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/flutter-forms.csv",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/flutter-forms.json",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/flutter-forms.md",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/flutter-forms.pdf",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/flutter-forms.zip",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-forms-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-forms/download",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}