flutter-bloc-forms
Use when managing complex form state, synchronous and asynchronous input validation, or form submission transitions in BLoC.
Skill by dhruvanbhalara
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dhruvanbhalara-flutter-bloc-forms
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/flutter-bloc-forms
What's inside
- Skill name
flutter-bloc-forms- Description
- Use when managing complex form state, synchronous and asynchronous input validation, or form submission transitions in BLoC.
- License
- MIT
- Metadata
- category: ui · languages: dart · platforms: flutter
- Instructions
- 61 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Form Architecture with BLoC
- Manage form state in a dedicated `FormBloc` (not in widget `setState`)
- Each form field maps to a property in the BLoC state
- Validate on field change (real-time) or on submit (batch) depending on UX requirements
- Emit `FormSubmitting`, `FormSuccess`, `FormError` states for submission flow
## Form Events
- `FieldChanged(field, value)`: update a single field in state
- `FormSubmitted`: trigger validation and submission
- `FormReset`: clear all fields and errors
## Form State
- Use a single state class with all field values, field-level errors, and form status:
```dart
sealed class FormStatus { initial, submitting, success, failure }
```
- Field errors: `Map<String, String?>` keyed by field name (`null` means valid)
# Validation Patterns
- Validate in the domain layer (not in widgets or BLoCs)
- Create pure validator functions that return `String?` (null = valid, string = error message):
```dart
String? validateEmail(String value) =>
value.contains('@') ? null : 'Invalid email';
```
- Compose validators: `String? validate(String v) => validateRequired(v) ?? validateEmail(v)`
- Use localized error messages via `context.l10n`: no hardcoded validation strings
# Input Widgets
- Use `TextFormField` with `InputDecoration` for consistent styling
- Always set `textInputAction` for proper keyboard behavior (`next`, `done`)
- Always set `keyboardType` matching the field type (`emailAddress`, `phone`, `number`)
- Use `inputFormatters` to restrict input (e.g., `FilteringTextInputFormatter.digitsOnly`)
- Assign `Key('feature_fieldName')` to every form field for test access
- Use `AutofillHints` for login/signup forms (email, password, name)
- Wrap form fields with `Focus` or `FocusTraversalGroup` for proper tab order
# Controller Lifecycle
- Declare `TextEditingController` as `late final` in `initState()`: dispose in `dispose()`
- Sync controllers to BLoC via `onChanged` callback or controller listener
# Form Submission
- Disable submit button while `FormStatus.submitting` to prevent double-submission
- Show inline field errors below each field (not just a top-level error)
- On success: navigate, show success feedback, and reset form if staying on same page
- On failure: show error feedback via `SnackBar` or inline, keep form data intact
# Common Form Patterns
- **Search**: Use `debounce` transformer on search events (300-500ms delay)
- **Multi-step**: Each step is a separate form state within one `FormBloc`, validated independently
- **Dependent fields**: Update dependent field options in `on<FieldChanged>` handler (e.g., country → city)From dhruvanbhalara/skills, MIT.
More from dhruvanbhalara/skills
- 0.611score
dart-fix-runtime-errors
dhruvanbhalara
Use when diagnosing runtime failures, type cast errors, null check violations, or unhandled asynchronous exceptions in Dart.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-build-cli-app
dhruvanbhalara
Use when creating Dart command-line tools, parsing CLI arguments with args, handling exit codes, or managing child processes.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-logic-patterns
dhruvanbhalara
Use when organizing business logic, implementing algorithmic workflows, or applying Dart data structures and pattern matching.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-memory
dhruvanbhalara
Use when troubleshooting memory leaks, optimizing garbage collection overhead, or disposing streams and listeners in Dart.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-add-widget-preview
dhruvanbhalara
Use when configuring widget previews in Flutter development, testing visual component variations, or isolating widget UI states.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-apply-architecture-best-practices
dhruvanbhalara
Use when structuring Flutter application layers across data, domain, and presentation using Clean Architecture and BLoC.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-bloc
dhruvanbhalara
Use when implementing state management with sealed BLoC classes, registering dependency injection with injectable, or setting up GoRouter listeners.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-config
dhruvanbhalara
Use when configuring build flavors, passing environment variables via dart-define-from-file, or setting up stage-specific credentials.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-debugging
dhruvanbhalara
Use when diagnosing Flutter layout issues, inspecting widget rebuilds, setting breakpoints, or tracking down UI rendering anomalies.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-devtools
dhruvanbhalara
Use when profiling CPU performance, tracking memory leaks, inspecting widget trees, or viewing network traffic in Flutter DevTools.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-dio
dhruvanbhalara
Use when configuring HTTP network clients with Dio, adding auth token interceptors, handling retry logic, or caching API responses.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-firebase
dhruvanbhalara
Use when integrating Firebase Authentication, Cloud Firestore, Cloud Messaging, Crashlytics, or Firebase Analytics in Flutter.
SkillBFreshness: B★ 30Claude Code +9
Signals
- Stars
- 30
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Aug 29, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/dhruvanbhalara/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dhruvanbhalara
- 0.611score
dart-fix-runtime-errors
dhruvanbhalara
Use when diagnosing runtime failures, type cast errors, null check violations, or unhandled asynchronous exceptions in Dart.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-build-cli-app
dhruvanbhalara
Use when creating Dart command-line tools, parsing CLI arguments with args, handling exit codes, or managing child processes.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-logic-patterns
dhruvanbhalara
Use when organizing business logic, implementing algorithmic workflows, or applying Dart data structures and pattern matching.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
dart-memory
dhruvanbhalara
Use when troubleshooting memory leaks, optimizing garbage collection overhead, or disposing streams and listeners in Dart.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-add-widget-preview
dhruvanbhalara
Use when configuring widget previews in Flutter development, testing visual component variations, or isolating widget UI states.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
flutter-apply-architecture-best-practices
dhruvanbhalara
Use when structuring Flutter application layers across data, domain, and presentation using Clean Architecture and BLoC.
SkillBFreshness: B★ 30Claude Code +9
Cite this page
flutter-bloc-forms skill. Agent Mart. https://agentmart.dev/skills/dhruvanbhalara-flutter-bloc-forms (last updated 2026-10-24)