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.

referenceswidget-patterns.md

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

Widget Patterns

Optimized Widget Pattern

// Use const constructors
class OptimizedCard extends StatelessWidget {
  final String title;
  final VoidCallback onTap;

  const OptimizedCard({
    super.key,
    required this.title,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return Card(
      child: InkWell(
        onTap: onTap,
        child: Padding(
          padding: const EdgeInsets.all(16),
          child: Text(title, style: Theme.of(context).textTheme.titleMedium),
        ),
      ),
    );
  }
}

Responsive Layout

class ResponsiveLayout extends StatelessWidget {
  final Widget mobile;
  final Widget? tablet;
  final Widget desktop;

  const ResponsiveLayout({
    super.key,
    required this.mobile,
    this.tablet,
    required this.desktop,
  });

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
      builder: (context, constraints) {
        if (constraints.maxWidth >= 1100) return desktop;
        if (constraints.maxWidth >= 650) return tablet ?? mobile;
        return mobile;
      },
    );
  }
}

Custom Hooks (flutter_hooks)

import 'package:flutter_hooks/flutter_hooks.dart';

class CounterWidget extends HookWidget {
  @override
  Widget build(BuildContext context) {
    final counter = useState(0);
    final controller = useTextEditingController();

    useEffect(() {
      // Setup
      return () {
        // Cleanup
      };
    }, []);

    return Column(
      children: [
        Text('Count: ${counter.value}'),
        ElevatedButton(
          onPressed: () => counter.value++,
          child: const Text('Increment'),
        ),
      ],
    );
  }
}

Sliver Patterns

CustomScrollView(
  slivers: [
    SliverAppBar(
      expandedHeight: 200,
      pinned: true,
      flexibleSpace: FlexibleSpaceBar(
        title: const Text('Title'),
        background: Image.network(imageUrl, fit: BoxFit.cover),
      ),
    ),
    SliverList(
      delegate: SliverChildBuilderDelegate(
        (context, index) => ListTile(title: Text('Item $index')),
        childCount: 100,
      ),
    ),
  ],
)

Key Optimization Patterns

Pattern Implementation
const widgets Add const to static widgets
keys Use Key for list items
select ref.watch(provider.select(...))
RepaintBoundary Isolate expensive repaints
ListView.builder Lazy loading for lists
const constructors Always use when possible

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.