flutter
БесплатноБез исполняемых скриптовНе проверенExpert guidance for Flutter, Google's UI toolkit for building natively compiled applications for mobile, web, and desktop from a single Dart codebase. Helps…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Flutter — Cross-Platform UI Framework
Overview
Flutter, Google's UI toolkit for building natively compiled applications for mobile, web, and desktop from a single Dart codebase. Helps developers build performant cross-platform apps with custom widgets, state management, platform channels, and production deployment.
Instructions
Project Setup
# Install Flutter (macOS; other systems: https://docs.flutter.dev/install)
brew install --cask flutter
# Verify installation and see which toolchains are missing
flutter doctor
flutter create fleet_tracker --org com.northwindlogistics --platforms ios,android,web
cd fleet_tracker
# Run in development
flutter run # Auto-detects connected device/emulator
flutter run -d chrome # Run on web
flutter test # Unit and widget tests
The stable channel still ships package:flutter/material.dart. Material and Cupertino are being split into the material_ui and cupertino_ui packages; migrating is optional and done with dart fix --apply --code=migrate_design_widgets. Third-party packages that still import the old path keep working through MaterialUiCompatibilityBridge once you migrate.
Widget Composition
// lib/screens/home_screen.dart — Composable widget architecture
// Flutter UIs are built by composing small, reusable widgets.
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Dashboard'),
actions: [
IconButton(
icon: const Icon(Icons.notifications_outlined),
onPressed: () => context.push('/notifications'),
),
],
),
body: RefreshIndicator(
onRefresh: () async {
// Pull-to-refresh logic
},
child: ListView(
padding: const EdgeInsets.all(16),
children: const [
Text('Recent Activity', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 12),
ListTile(title: Text('Truck 14 left Rotterdam depot')),
ListTile(title: Text('Truck 9 delivered order #4821')),
],
),
),
);
}
}
State Management with Riverpod
// lib/providers/auth_provider.dart — Riverpod 3 (flutter_riverpod ^3.4)
// StateNotifier moved to flutter_riverpod/legacy.dart; use Notifier.
import 'package:flutter_riverpod/flutter_riverpod.dart';
class User {
final String id;
final String email;
final String name;
const User({required this.id, required this.email, required this.name});
factory User.fromJson(Map<String, dynamic> j) =>
User(id: j['id'] as String, email: j['email'] as String, name: j['name'] as String);
}
class AuthState {
final User? user;
final bool isLoading;
final String? error;
const AuthState({this.user, this.isLoading = false, this.error});
}
class AuthNotifier extends Notifier<AuthState> {
@override
AuthState build() => const AuthState();
Future<void> login(String email, String password) async {
state = const AuthState(isLoading: true);
try {
final response = await ref.read(apiClientProvider).post('/auth/login', {
'email': email,
'password': password,
});
state = AuthState(user: User.fromJson(response.data as Map<String, dynamic>));
} catch (e) {
state = AuthState(error: e.toString());
}
}
void logout() => state = const AuthState();
}
final authProvider = NotifierProvider<AuthNotifier, AuthState>(AuthNotifier.new);
final projectsProvider = FutureProvider<List<String>>((ref) async {
final response = await ref.watch(apiClientProvider).get('/projects');
return (response.data as List).cast<String>();
});
Wrap the app in ProviderScope (runApp(const ProviderScope(child: MyApp()))) and read state in a ConsumerWidget:
class ProjectList extends ConsumerWidget {
const ProjectList({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final projects = ref.watch(projectsProvider);
return projects.when(
data: (names) => ListView(children: [for (final n in names) ListTile(title: Text(n))]),
loading: () => const Center(child: CircularProgressIndicator()),
error: (e, _) => Center(child: Text('Could not load projects: $e')),
);
}
}
Riverpod 3 retries failing providers automatically with backoff, and AsyncValue.valueOrNull was removed (use .value).
Navigation with GoRouter
// lib/router.dart — Declarative routing (go_router ^18)
import 'package:flutter/foundation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
final routerProvider = Provider<GoRouter>((ref) {
// Tell the router to re-run redirect whenev
Установить flutter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flutter?
Expert guidance for Flutter, Google's UI toolkit for building natively compiled applications for mobile, web, and desktop from a single Dart codebase. Helps developers build performant cross-platform apps with custom widgets, state management, platform channels, and production deployment.
Как установить скилл flutter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flutter запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic