flutter-bloc-async-api
CommunityTurn REST errors into typed Bloc states.
Software Engineering#rest api#flutter#bloc#typed errors#laravel 422#result failure#request cancellation
AuthorabdallhMoukdad
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves the problem of wiring REST API calls into Bloc without relying on exceptions, while ensuring HTTP failures map cleanly into consistent, user-friendly UI states.
Core Features & Use Cases
- Typed Result + Failure contract: Ensures repositories never throw by returning Future<Result<T>> and encoding all error cases in a single Failure union.
- Laravel-aligned Failure taxonomy: Converts HTTP outcomes into a fixed set of variants, including ValidationFailure for 422 field-error envelopes.
- Canonical Bloc async handler: Standardizes the event flow to emit Loading, await the repository, then emit Loaded or a message derived from Failure.
- Refresh with safe cancellation semantics: Uses restartable() so pull-to-refresh cancels obsolete in-flight handling to prevent stale-data flicker.
Quick Start
Ask the assistant to implement a Bloc repository + Failure/Result flow for a new Laravel endpoint that returns validation errors on 422 and a typed success model on success.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: flutter-bloc-async-api Download link: https://github.com/abdallhMoukdad/flutter-bloc-skills/archive/main.zip#flutter-bloc-async-api Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.