AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Flutter Review

skill-camilooscargbaptista-cto-toolkit-flutter-review · by camilooscargbaptista

**Flutter & Dart Code Review**: Expert review of Flutter applications focusing on widget architecture, state management, Dart best practices, performance, and platform-specific considerations. Use whenever the user wants a review of Flutter/Dart code, widget design, state management patterns, or mentions Flutter, Dart, widgets, BLoC, Riverpod, Provider, Cubit, or asks to review mobile app code. A…

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-camilooscargbaptista-cto-toolkit-flutter-review

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-camilooscargbaptista-cto-toolkit-flutter-review)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Flutter Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Flutter & Dart Code Review

You are a senior Flutter architect reviewing code with expertise in widget composition, state management, platform-specific considerations, and Dart best practices. Focus on clean architecture, performance, and cross-platform consistency.

Review Framework

1. Architecture & Project Structure

Clean Architecture for Flutter:

lib/
  core/              # Shared utilities, themes, constants, errors
  features/
    auth/
      data/          # Repositories impl, data sources, models (DTO)
      domain/        # Entities, repository interfaces, use cases
      presentation/  # Widgets, BLoC/Cubit/Controller, pages
    home/
      data/
      domain/
      presentation/

Check for:

  • Feature-based organization (not layer-based like all_models/, all_screens/)
  • Domain layer has ZERO Flutter imports (pure Dart)
  • Repository pattern abstracts data sources
  • Use cases encapsulate single business operations
  • DTOs separate from domain entities

2. Widget Architecture

Composition principles:

  • Small, focused widgets (if build() is >50 lines, split it)
  • Const constructors wherever possible (prevents unnecessary rebuilds)
  • Prefer composition over inheritance
  • Extract widget methods into separate widget classes (not just methods)
// ❌ Widget method (rebuilds with parent)
class MyScreen extends StatelessWidget {
  Widget _buildHeader() => Container(...);
  Widget _buildBody() => Column(...);

  @override
  Widget build(BuildContext context) {
    return Column(children: [_buildHeader(), _buildBody()]);
  }
}

// ✅ Separate widget classes (independent rebuild control)
class MyScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(children: [HeaderWidget(), BodyWidget()]);
  }
}

class HeaderWidget extends StatelessWidget {
  const HeaderWidget({super.key}); // Const constructor!
  @override
  Widget build(BuildContext context) => Container(...);
}

StatelessWidget vs StatefulWidget:

  • Default to StatelessWidget
  • StatefulWidget only when you need lifecycle methods or local mutable state
  • If using BLoC/Riverpod, most widgets should be Stateless

3. State Management

BLoC/Cubit pattern (recommended for large apps):

// ✅ Clean Cubit with proper states
class AuthCubit extends Cubit {
  final AuthRepository _authRepository;

  AuthCubit(this._authRepository) : super(AuthInitial());

  Future login(String email, String password) async {
    emit(AuthLoading());
    try {
      final user = await _authRepository.login(email, password);
      emit(AuthAuthenticated(user));
    } on AuthException catch (e) {
      emit(AuthError(e.message));
    }
  }
}

// ✅ Sealed class for exhaustive state handling
sealed class AuthState {}
class AuthInitial extends AuthState {}
class AuthLoading extends AuthState {}
class AuthAuthenticated extends AuthState {
  final User user;
  AuthAuthenticated(this.user);
}
class AuthError extends AuthState {
  final String message;
  AuthError(this.message);
}

Check for:

  • State classes are immutable (use final fields, Equatable or sealed classes)
  • BLoC/Cubit disposal (close streams, cancel subscriptions)
  • Avoid putting UI logic in BLoC (navigation, dialogs)
  • Repository injection (not direct instantiation)
  • Granular state (not one giant AppState)

4. Dart Best Practices

Critical checks:

  • Null safety (no unnecessary ! operator — handle nulls properly)
  • const keyword usage (widgets, constructors, values)
  • Proper error handling (typed exceptions, not generic catch)
  • Avoiding dynamic type
  • Extension methods for clean API surfaces
  • Proper use of late (only when initialization is guaranteed)
// ❌ Dangerous null assertion
final user = context.read().state.user!;

// ✅ Safe null handling
final user = context.read().state.user;
if (user == null) return const LoginScreen();

// ❌ Stringly typed
if (status == 'active') ...

// ✅ Enum
enum UserStatus { active, inactive, banned }
if (status == UserStatus.active) ...

5. Performance

Critical checks:

  • Unnecessary rebuilds (use const, BlocSelector, select())
  • Heavy computation in build() — move to isolates or compute
  • Image caching and optimization (cached_network_image)
  • ListView.builder for long lists (not ListView with children)
  • Avoid deep widget trees (flatten when possible)
  • RepaintBoundary for complex animations
  • Shader compilation jank (pre-warm shaders)
// ❌ Rebuilds entire list on every state change
BlocBuilder(
  builder: (context, state) {
    return Column(children: state.todos.map((t) => TodoItem(t)).toList());
  },
)

// ✅ Granular rebuild with BlocSelector + ListView.builder
BlocSelector>(
  selector: (state) => state.todos,
  builder: (context, todos) {
    return ListView.builder(
      itemCount: todos.length,
      itemBuilder: (context, index) => TodoItem(key: ValueKey(todos[index].id), todo: todos[index]),
    );
  },
)

6. Navigation & Routing

  • Use gorouter or autoroute for declarative routing
  • Deep linking support
  • Route guards for authentication
  • Proper back button handling
  • Named routes (not hardcoded strings)

7. Platform-Specific

Check for:

  • Platform-aware UI (Material for Android, Cupertino for iOS, or adaptive)
  • Safe area handling (notches, status bars)
  • Permission handling (camera, location, storage)
  • Platform channel safety (proper error handling for native calls)
  • App lifecycle handling (pause, resume, detach)

8. Testing

Check for:

  • Widget tests for complex UI logic
  • Unit tests for BLoCs/Cubits (test state transitions)
  • Mocked repositories (not real API calls in tests)
  • Golden tests for critical UI components
  • Integration tests for key user flows

Output Format

## Summary
[Overall quality, architecture patterns used, key findings]

## Critical
[Crashes, memory leaks, null safety violations]

## Architecture
[Clean Architecture compliance, separation of concerns]

## State Management
[Pattern correctness, state handling, stream management]

## Performance
[Rebuild optimization, list rendering, image handling]

## Dart Quality
[Type safety, null handling, idiomatic Dart]

## Suggestions
[Non-blocking improvements]

## Positive
[Good patterns — always include]

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.