flutter-bloc-forms

Model Flutter form inputs as Formz value objects orchestrated by a Bloc.

Updated May 16, 2026
One-click install
npx skills add https://github.com/abdallhMoukdad/flutter-bloc-skills --skill flutter-bloc-forms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-bloc-forms
Source: https://github.com/abdallhMoukdad/flutter-bloc-skills/tree/main/skills/flutter-bloc-forms
Command: npx skills add https://github.com/abdallhMoukdad/flutter-bloc-skills --skill flutter-bloc-forms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex Flutter forms become hard to keep consistent when validation is split across widgets, Bloc state, and server responses, especially when Laravel returns per-field 422 errors.

Core Features & Use Cases

  • Formz-based per-field validation: Moves validation rules into typed Formz value objects so errors are derived from field inputs and only displayed after the field becomes dirty.
  • Bloc-driven orchestration: Uses a Bloc to hold all form fields, compute overall validity, manage submission status, and submit requests using the same Bloc event flow.
  • Laravel 422 round-trip mapping: Routes server-side validation errors back to the correct FormzInput instances so the UI shows the right error messages inline.

Quick Start

Ask the AI to generate a LoginFormBloc with EmailInput and PasswordInput that maps Laravel 422 validation errors to the corresponding fields.

Frequently Asked Questions about flutter-bloc-forms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map Laravel 422 validation errors to Flutter form fields?

You map Laravel 422 validation errors by routing the server-side error payload keys directly into the corresponding FormzInput instances managed by your Bloc, which then updates the UI to display inline field errors.

What is the best way to manage complex Flutter form validation withBloc?

Managing complex Flutter form validation with Bloc involves modeling inputs as typed Formz value objects and orchestrating them in a Bloc to compute derived overall validity and manage distinct submission status.

How do I handle cross-field validation rules in Flutter forms?

You handle cross-field validation rules in Flutter forms by holding all fields within a single Bloc state, which computes derived form validity by evaluating dependencies between multiple FormzInput value objects.

Does Flutter form validation with Formz show errors before user input?

Flutter form validation with Formz only displays errors after a field becomes dirty, meaning validation errors are derived from field inputs and suppressed until the user interacts with that specific input.

Can I use hydrated bloc to persist Flutter form state across screen changes?

Yes, you can integrate hydrated bloc to persist Flutter form state, retaining the FormzInput values and Bloc submission status even when the user navigates away or restarts the application.