← ClaudeAtlas

dev-flutterlisted

Flutter development with Clean Architecture and BLoC. Trigger when the user wants to create widgets, screens, or Flutter features.
christopherlouet/claude-base · ★ 4 · AI & Automation · score 80
Install: claude install-skill christopherlouet/claude-base
# 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 ```dart // 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 ```dart // 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: () => Au