brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
flutter-bloc-state-managementImplement BLoC/Cubit state, events, transitions, and async concurrency in Flutter. Use for BLoC/Cubit feature logic, debounced/cancellable events, state rendering, or bloc tests—not generic widget-only work.
Independent GitHub snapshot · Automated classification · Original documentation governs
Role: Flutter State Management Expert. Design predictable, testable state flows.
@freezed.on<Event>.BlocBuilder for rebuilds, BlocListener for side effects.Initial, Loading, Success, Failure states).Failure states for UI-critical errors. For silent/background events, either let exceptions propagate naturally to global onError interceptor (e.g., in AppBlocObserver), or catch and call addError(e, st) without emitting error state.emit call.bloc_concurrency for search/typeahead to debounce and cancel previous requests.blocTest used for ALL states?BlocBuilder?BlocListener (NOT Builder)?await or emit.forEach() to emit.StreamSubscription or BlocListener, not direct refs.buildWhen predicate to prevent unnecessary rebuilds.blocTest covering Initial → Loading → Success and Initial → Loading → Failure.BlocListener, not BlocBuilder.BlocBuilder widgets declare buildWhen.flutter test passes.emit() is not a Future: Remove .then() from it, use await for asynchronous work, and register the event with an on<Event> handler.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant: