home / skills / partme-ai / full-stack-skills / flutter

flutter skill

/skills/flutter

This skill helps you build Flutter apps by guiding widgets, state management, navigation, and platform integration with practical best practices.

npx playbooks add skill partme-ai/full-stack-skills --skill flutter

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
695 B
---
name: flutter
description: Provides comprehensive guidance for Flutter development including widgets, state management, navigation, platform channels, and mobile app development. Use when the user asks about Flutter, needs to create Flutter applications, implement Flutter widgets, or work with Flutter features.
license: Complete terms in LICENSE.txt
---

## When to use this skill

Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]

## How to use this skill

[待完善:根据具体工具添加使用指南]

## Best Practices

[待完善:根据具体工具添加最佳实践]

## Keywords

[待完善:根据具体工具添加关键词]

Overview

This skill provides practical, hands-on guidance for Flutter development across app architecture, widgets, state management, navigation, and platform integration. It helps developers design UI, manage state, implement navigation flows, and connect native platform features. Use it to accelerate building reliable cross-platform mobile apps with Flutter best practices.

How this skill works

The skill inspects developer goals and the Flutter problem domain, then recommends patterns, code snippets, and configuration steps tailored to the task. It explains when to use specific widgets, state management solutions (setState, Provider, Riverpod, BLoC), and navigation approaches (Navigator 2.0, go_router). It also outlines platform channel usage, testing strategies, and performance optimizations.

When to use it

  • Starting a new Flutter app or choosing an app architecture
  • Designing responsive UI with custom widgets and layouts
  • Selecting and implementing state management
  • Implementing navigation and deep linking
  • Integrating native device features via platform channels
  • Improving performance, testing, or release configuration

Best practices

  • Prefer composition of small, reusable widgets over large monolithic widgets
  • Choose state management that fits app complexity; start simple and migrate as needed
  • Use const constructors and widget immutability to reduce rebuilds
  • Profile and optimize using Flutter DevTools before changing architecture
  • Write unit and widget tests early; cover business logic separately from UI

Example use cases

  • Create a responsive onboarding flow with page transitions and state persistence
  • Migrate a screen from setState to Riverpod for better testability
  • Implement bottom navigation with nested navigation stacks using Navigator 2.0
  • Call native camera and file APIs from Dart using MethodChannel
  • Reduce jank by identifying widget rebuild hotspots and optimizing build methods

FAQ

Which state management should I choose for a medium-sized app?

Start with Provider or Riverpod for predictable dependency injection and testability; adopt BLoC if you need strict separation and event-driven flows.

How do I debug performance issues in Flutter?

Use Flutter DevTools to profile frames, inspect the widget rebuild tree, and review memory allocation. Address expensive builds and large image allocations first.