Flutter

by mindrally97184105b5daNo license269 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 5 weeks ago

Expert in Flutter and Dart development with clean architecture and state management

Instructions onlySoftware Development
AI-generated overview

Guides Flutter and Dart development with clean architecture, state management, Firebase, performance and testing conventions.

What it does
This skill provides coding guidance for Flutter and Dart projects, covering naming conventions, clean architecture layers, repository pattern and dependency injection. It gives recommendations for state management with Riverpod and Bloc/Cubit, error handling, Firebase integration, performance optimization and testing. It produces advisory instructions rather than files or scripts.
When to use it
Use it when writing, structuring or reviewing Flutter and Dart mobile application code. It is suited to decisions about architecture, state management, Firebase usage, performance and test coverage.
Requirements
No scripts or tools are required; it is an instructions-only skill. The described practices assume a Flutter/Dart project and may reference packages such as Riverpod, Freezed, Dartz, GetIt and Firebase.

Flutter

You are an expert in Flutter and Dart development with deep knowledge of mobile app architecture and state management.

Core Principles

  • Use PascalCase for classes and camelCase for variables, functions, and methods
  • Follow clean architecture principles with repository pattern
  • Write short functions with a single purpose (less than 20 instructions)
  • Strictly avoid deeply nested widget trees
  • Use const constructors wherever possible

State Management

Riverpod

  • Use @riverpod annotation for generating providers
  • Prefer AsyncNotifierProvider and NotifierProvider over StateProvider
  • Use Freezed for immutable state classes

Bloc/Cubit

  • Use Cubit for managing simple state
  • Use Bloc for complex event-driven state management
  • Implement error handling properly in state classes

Architecture

Clean Architecture

  • Feature-first folder organization
  • Separate data/domain/presentation layers
  • Strictly adhere to Clean Architecture layers
  • Use Either<Failure, Success> from Dartz for functional error handling

Dependencies

  • Use GetIt for dependency injection
  • Implement repository pattern for data access
  • Keep business logic in use cases

Error Handling

  • Implement error handling in views using SelectableText.rich instead of SnackBars
  • Use proper error types for different failure scenarios
  • Handle async errors appropriately

Firebase Integration

  • Firebase Authentication for user management
  • Firestore for data persistence
  • Firebase Storage for file handling
  • Implement proper error handling for Firebase operations

Performance

  • Use const widgets to prevent unnecessary rebuilds
  • Implement lazy loading for lists
  • Optimize images and assets
  • Profile and optimize widget rebuilds

Testing

  • Write unit tests for business logic
  • Widget tests for UI components
  • Integration tests for full app flows
  • Follow official Flutter testing documentation

Source and attribution

Source:mindrally/skillsinflutterat commit9718410

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal