All skills
jeffallan avatar

/flutter-expert

@efebc44
by jeffallanjeffallan/claude-skills12k stars
1,127

Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.

Use this Skill: https://skilld.dev/gh/jeffallan/claude-skills/flutter-expert

This session only. Nothing lands on disk.

referencesperformance.md

≈511 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Performance Optimization

Profiling Commands

# Run in profile mode
flutter run --profile

# Analyze performance
flutter analyze

# DevTools
flutter pub global activate devtools
flutter pub global run devtools

Common Optimizations

Const Widgets

// ❌ Rebuilds every time
Widget build(BuildContext context) {
  return Container(
    padding: EdgeInsets.all(16),  // Creates new object
    child: Text('Hello'),
  );
}

// ✅ Const prevents rebuilds
Widget build(BuildContext context) {
  return Container(
    padding: const EdgeInsets.all(16),
    child: const Text('Hello'),
  );
}

Selective Provider Watching

// ❌ Rebuilds on any user change
final user = ref.watch(userProvider);
return Text(user.name);

// ✅ Only rebuilds when name changes
final name = ref.watch(userProvider.select((u) => u.name));
return Text(name);

RepaintBoundary

// Isolate expensive widgets
RepaintBoundary(
  child: ComplexAnimatedWidget(),
)

Image Optimization

// Use cached_network_image
CachedNetworkImage(
  imageUrl: url,
  placeholder: (_, __) => const CircularProgressIndicator(),
  errorWidget: (_, __, ___) => const Icon(Icons.error),
)

// Resize images
Image.network(
  url,
  cacheWidth: 200,  // Resize in memory
  cacheHeight: 200,
)

Compute for Heavy Operations

// ❌ Blocks UI thread
final result = heavyComputation(data);

// ✅ Runs in isolate
final result = await compute(heavyComputation, data);

Performance Checklist

Check Solution
Unnecessary rebuilds Add const, use select()
Large lists Use ListView.builder
Image loading Use cached_network_image
Heavy computation Use compute()
Jank in animations Use RepaintBoundary
Memory leaks Dispose controllers

DevTools Metrics

  • Frame rendering time: < 16ms for 60fps
  • Widget rebuilds: Minimize unnecessary rebuilds
  • Memory usage: Watch for leaks
  • CPU profiler: Identify bottlenecks

Source: SKILL.md on GitHub

1 alert17d5 checks · Risk CRITICAL
  • Gen Agent Trust Hub17d

    The skill is a legitimate development guide for Flutter and Dart applications. It contains standard coding patterns, configuration guides, and architecture references. The URL flagged by automated scans belongs to the verified author's own repository infrastructure and presents no security risk.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    7 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at efebc44. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago
Other metadata
metadata
{
  "author": "https://github.com/Jeffallan",
  "version": "1.1.0",
  "domain": "frontend",
  "triggers": "Flutter, Dart, widget, Riverpod, Bloc, GoRouter, cross-platform",
  "role": "specialist",
  "scope": "implementation",
  "output-format": "code",
  "related-skills": "react-native-expert, test-master, fullstack-guardian"
}
  • flutter
  • dart
  • riverpod
  • bloc
  • gorouter
  • widget
  • state-management
  • cross-platform
  • mobile

README badge

README badge for jeffallan/claude-skills/flutter-expert

Provides patterns and workflow for building cross-platform Flutter apps with Dart, covering Riverpod or Bloc state management, GoRouter navigation, widget optimization, and performance profiling. Use this skill when implementing Flutter 3+ features, custom widgets, or debugging jank and rebuild issues.

Generated from the current SKILL.md.

Does this skill support both Riverpod and Bloc state management?
Yes. The skill covers both Riverpod (with StateNotifierProvider and ConsumerWidget) and Bloc/Cubit patterns. Load the appropriate reference guide based on your state management choice.
What versions of Flutter and Dart does this cover?
Flutter 3+ and Dart. The skill assumes a modern Flutter setup and uses current patterns like const constructors and DevTools profiling.
Does this skill include platform-specific iOS and Android implementations?
Yes. The skill covers platform-specific implementations as part of its core workflow, though detailed guidance is loaded from the performance and project structure references.
Can this skill help with performance optimization and jank fixes?
Yes. The skill includes a dedicated optimization workflow that uses Flutter DevTools profiling, identifies expensive build calls, and applies fixes like RepaintBoundary and const constructors.
Does this skill provide testing guidance?
Yes. Widget and integration testing with flutter_test is part of the core workflow, including test coverage tracking and targeted test additions when coverage drops.

Generated from the current SKILL.md. These answers refresh after source changes.