skills/flutter/flutter-bloc-forms/SKILL.md
Manage form state, validation, and input handling through dedicated FormBlocs. Use when building forms with real-time validation, multi-step flows, or complex input patterns like search debouncing.
npx skillsauth add dhruvanbhalara/skills flutter-bloc-formsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
FormBloc — NOT in widget setStateFormSubmitting, FormSuccess, FormError states for submission flowFieldChanged(field, value) — update a single field in stateFormSubmitted — trigger validation and submissionFormReset — clear all fields and errorssealed class FormStatus { initial, submitting, success, failure }
Map<String, String?> keyed by field name — null means validString? (null = valid, string = error message):
String? validateEmail(String value) =>
value.contains('@') ? null : 'Invalid email';
String? validate(String v) => validateRequired(v) ?? validateEmail(v)context.l10n — no hardcoded validation stringsTextFormField with InputDecoration for consistent stylingtextInputAction for proper keyboard behavior (next, done)keyboardType matching the field type (emailAddress, phone, number)inputFormatters to restrict input (e.g., FilteringTextInputFormatter.digitsOnly)Key('feature_fieldName') to every form field for test accessAutofillHints for login/signup forms (email, password, name)Focus or FocusTraversalGroup for proper tab orderTextEditingController as late final in initState() — dispose in dispose()onChanged callback or controller listenerFormStatus.submitting to prevent double-submissionSnackBar or inline, keep form data intactdebounce transformer on search events (300-500ms delay)FormBloc, validated independentlyon<FieldChanged> handler (e.g., country → city)development
Perform REST API networking operations (GET, POST, PUT, DELETE) using the lightweight and robust standard `http` package, including platform configurations and background parsing models.
development
Configure internationalization and localization support using Flutter's built-in l10n system, App Resource Bundle (ARB) files, and ICU formatting syntax.
development
Create model classes with fromJson/toJson using dart:convert and Dart 3 pattern matching. Use when manually mapping JSON to classes, parsing HTTP responses, or choosing between manual and code-generated serialization.
data-ai
Diagnose and fix Flutter layout constraint violations (RenderFlex overflow, unbounded height/width, ParentData misuse). Use when encountering layout exceptions, yellow-black overflow stripes, or red error screens.