← スキル一覧に戻る

flutter-development
by superQdsj
⭐ 0🍴 0📅 2026年1月24日
SKILL.md
name: flutter-development description: Flutter and Dart development guide following modern best practices. Use when writing Flutter/Dart code, creating widgets, managing state, setting up navigation with GoRouter, theming with Material 3, testing, or following Effective Dart guidelines. Triggers on Flutter, Dart, Widget, StatelessWidget, StatefulWidget, ThemeData, ColorScheme.
Flutter Development
Expert guide for building beautiful, performant, and maintainable Flutter applications.
Quick Start
Core Principles
- SOLID Principles: Apply throughout codebase
- Composition over Inheritance: Favor composing smaller widgets
- Immutability: Widgets (especially
StatelessWidget) should be immutable - Separation of Concerns: UI logic separate from business logic
Project Structure
lib/
├── main.dart # Application entry point
├── presentation/ # Widgets, screens
├── domain/ # Business logic classes
├── data/ # Models, API clients
└── core/ # Utilities, extensions
Naming Conventions
PascalCasefor classescamelCasefor members/variables/functions/enumssnake_casefor files- Line length: 80 characters or fewer
Widget Essentials
Prefer Composition
// ✅ Good: Small, focused widgets
class UserCard extends StatelessWidget {
const UserCard({super.key, required this.user});
final User user;
@override
Widget build(BuildContext context) {
return Card(
child: Column(
children: [
UserAvatar(user: user),
UserInfo(user: user),
],
),
);
}
}
// ❌ Avoid: Private helper methods returning widgets
Widget _buildUserInfo() => ... // Use private Widget classes instead
Use Const Constructors
// ✅ Reduces rebuilds
const SizedBox(height: 16),
const Padding(padding: EdgeInsets.all(8), child: Icon(Icons.star)),
Performance Tips
- Use
ListView.builderfor long lists (lazy loading) - Use
compute()for expensive calculations (separate isolate) - Avoid expensive operations in
build()methods
Navigation with GoRouter
final GoRouter _router = GoRouter(
routes: <RouteBase>[
GoRoute(
path: '/',
builder: (context, state) => const HomeScreen(),
routes: <RouteBase>[
GoRoute(
path: 'details/:id',
builder: (context, state) {
final String id = state.pathParameters['id']!;
return DetailScreen(id: id);
},
),
],
),
],
);
// Use in MaterialApp
MaterialApp.router(routerConfig: _router);
Detailed References
For comprehensive guidance on specific topics:
| Topic | Reference | When to Use |
|---|---|---|
| State Management | state-management.md | ValueNotifier, ChangeNotifier, Streams, MVVM |
| Theming & Design | theming.md | ThemeData, ColorScheme, Material 3, fonts, layouts |
| Testing | testing.md | Unit, widget, integration tests, mocking |
| Architecture | architecture.md | MVVM, data flow, routing, feature organization |
| Code Quality | code-quality.md | Dart/Flutter best practices, API design |
| Documentation | documentation.md | dartdoc, comment style, accessibility |
Package Management
# Add dependency
flutter pub add <package_name>
# Add dev dependency
flutter pub add dev:<package_name>
# Run code generation (for json_serializable, etc.)
dart run build_runner build --delete-conflicting-outputs
Essential Packages
| Purpose | Package |
|---|---|
| Navigation | go_router |
| JSON Serialization | json_serializable, json_annotation |
| Fonts | google_fonts |
| Testing | package:test, package:flutter_test, package:checks |
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です