| name | flutter-feature-implementation |
| description | Use when implementing a Flutter feature from scratch or completing one in progress. Covers file structure, design system compliance, state management setup, error handling, testing, and build_runner requirements. |
Feature Implementation Skill
Checklist
Code Structure
Design System
State Management
Error Handling
Testing
Quality
Patterns
// ✅ Clear naming
class FeatureRepository {}
// ✅ Null safety
final name = user?.name ?? 'Guest';
// ✅ const
const Text('Static');
// ✅ Async/await
try {
final data = await repository.fetch();
emit(LoadedState(data));
} catch (e) {
emit(ErrorState(e.toString()));
}
// ✅ Bloc test
blocTest<MyBloc, MyState>(
'emits [Loading, Loaded]',
build: () {
when(() => repository.fetch()).thenAnswer((_) async => data);
return bloc;
},
act: (bloc) => bloc.add(LoadRequested()),
expect: () => [LoadingState(), LoadedState(data)],
);
Resources
- Extensions →
lib/core/utils/extensions/
- Helpers →
lib/core/utils/helpers/
- Validators →
lib/core/utils/validators/