Dev flutter
Skill christopherlouet/claude-base/.claude/skills/dev-flutter
Flutter development with Clean Architecture and BLoC. Trigger when the user wants to create widgets, screens, or Flutter features.From its SKILL.md
npx -y skills add christopherlouet/claude-base --skill dev-flutterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 410 tokens by cl100k_base, as published. Nobody here has run it
Flutter Development
Architecture
/lib/features/[feature]
├── /data
│ ├── /datasources # API, local storage
│ ├── /models # JSON serialization
│ └── /repositories # Implementation
├── /domain
│ ├── /entities # Business objects
│ ├── /repositories # Interfaces
│ └── /usecases # Business logic
└── /presentation
├── /bloc # State management
├── /pages # Screens
└── /widgets # UI components
BLoC Pattern
// Events
abstract class AuthEvent {}
class LoginRequested extends AuthEvent {
final String email, password;
LoginRequested(this.email, this.password);
}
// States
abstract class AuthState {}
class AuthInitial extends AuthState {}
class AuthLoading extends AuthState {}
class AuthSuccess extends AuthState { final User user; }
class AuthFailure extends AuthState { final String error; }
// BLoC
class AuthBloc extends Bloc<AuthEvent, AuthState> {
AuthBloc(): super(AuthInitial()) {
on<LoginRequested>(_onLogin);
}
}
Widgets
- Stateless for pure UI
- Stateful only if local state is needed
- const constructors when possible
- Composition over inheritance
Tests
// Widget test
testWidgets('shows button', (tester) async {
await tester.pumpWidget(MaterialApp(home: MyWidget()));
expect(find.byType(ElevatedButton), findsOneWidget);
});
// BLoC test
blocTest<AuthBloc, AuthState>(
'emits [Loading, Success] on login',
build: () => AuthBloc(),
act: (bloc) => bloc.add(LoginRequested('email', 'pass')),
expect: () => [AuthLoading(), isA<AuthSuccess>()],
);
What ships with it: 1 file
3.0 KB alongside SKILL.md
examples/
- feature-bloc.md3.0 KB