← 返回 Skills 市场
smasherlxd

Flutter Dev

作者 smasherlxd · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
401
总下载
0
收藏
11
当前安装
1
版本数
在 OpenClaw 中安装
/install flutter-dev
功能描述
Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platfor...
使用说明 (SKILL.md)

\r \r

Flutter Development Guide\r

\r A practical guide for building cross-platform applications with Flutter 3 and Dart. Focuses on proven patterns, state management, and performance optimization.\r \r

Quick Reference\r

\r

Widget Patterns\r

\r | Purpose | Component |\r |---------|-----------|\r | State management (simple) | StateProvider + ConsumerWidget |\r | State management (complex) | NotifierProvider / Bloc |\r | Async data | FutureProvider / AsyncNotifierProvider |\r | Real-time streams | StreamProvider |\r | Navigation | GoRouter + context.go/push |\r | Responsive layout | LayoutBuilder + breakpoints |\r | List display | ListView.builder |\r | Complex scrolling | CustomScrollView + Slivers |\r | Hooks | HookWidget + useState/useEffect |\r | Forms | Form + TextFormField + validation |\r \r

Performance Patterns\r

\r | Purpose | Solution |\r |---------|----------|\r | Prevent rebuilds | const constructors |\r | Selective updates | ref.watch(provider.select(...)) |\r | Isolate repaints | RepaintBoundary |\r | Lazy lists | ListView.builder |\r | Heavy computation | compute() isolate |\r | Image caching | cached_network_image |\r \r

Core Principles\r

\r

Widget Optimization\r

  • Use const constructors wherever possible\r
  • Extract static widgets to separate const classes\r
  • Use Key for list items (ValueKey, ObjectKey)\r
  • Prefer ConsumerWidget over StatefulWidget for state\r \r

State Management\r

  • Riverpod for dependency injection and simple state\r
  • Bloc/Cubit for event-driven workflows and complex logic\r
  • Never mutate state directly (create new instances)\r
  • Use select() to minimize rebuilds\r \r

Layout\r

  • 8pt spacing increments (8, 16, 24, 32, 48)\r
  • Responsive breakpoints: mobile (\x3C650), tablet (650-1100), desktop (>1100)\r
  • Support all screen sizes with flexible layouts\r
  • Follow Material 3 / Cupertino design guidelines\r \r

Performance\r

  • Profile with DevTools before optimizing\r
  • Target \x3C16ms frame time for 60fps\r
  • Use RepaintBoundary for complex animations\r
  • Offload heavy work with compute()\r \r

Checklist\r

\r

Widget Best Practices\r

  • const constructors on all static widgets\r
  • Proper Key on list items\r
  • ConsumerWidget for state-dependent widgets\r
  • No widget building inside build() method\r
  • Extract reusable widgets to separate files\r \r

State Management\r

  • Immutable state objects\r
  • select() for granular rebuilds\r
  • Proper provider scoping\r
  • Dispose controllers and subscriptions\r
  • Handle loading/error states\r \r

Navigation\r

  • GoRouter with typed routes\r
  • Auth guards via redirect\r
  • Deep linking support\r
  • State preservation across routes\r \r

Performance\r

  • Profile mode testing (flutter run --profile)\r
  • \x3C16ms frame rendering time\r
  • No unnecessary rebuilds (DevTools check)\r
  • Images cached and resized\r
  • Heavy computation in isolates\r \r

Testing\r

  • Widget tests for UI components\r
  • Unit tests for business logic\r
  • Integration tests for user flows\r
  • Bloc tests with blocTest()\r \r

References\r

\r | Topic | Reference |\r |-------|-----------|\r | Widget patterns, const optimization, responsive layout | Widget Patterns |\r | Riverpod providers, notifiers, async state | Riverpod State Management |\r | Bloc, Cubit, event-driven state | Bloc State Management |\r | GoRouter setup, routes, deep linking | GoRouter Navigation |\r | Feature-based structure, dependencies | Project Structure |\r | Profiling, const optimization, DevTools | Performance Optimization |\r | Widget tests, integration tests, mocking | Testing Strategies |\r | iOS/Android/Web specific implementations | Platform Integration |\r | Implicit/explicit animations, Hero, transitions | Animations |\r | Dio, interceptors, error handling, caching | Networking |\r | Form validation, FormField, input formatters | Forms |\r | i18n, flutter_localizations, intl | Localization |\r \r ---\r \r Flutter, Dart, Material Design, and Cupertino are trademarks of Google LLC and Apple Inc. respectively. Riverpod, Bloc, and GoRouter are open-source packages by their respective maintainers.\r

安全使用建议
This skill is documentation and example code only — it does not require secrets or perform installs. It's safe to read and use as a reference, but before copying examples into production: (1) review networking examples (they use placeholder base URLs like api.example.com) and replace with your real endpoints; (2) avoid leaving verbose logging (the LoggingInterceptor prints request bodies) in production since it can expose sensitive data; and (3) verify package versions and licenses in your own project. If you need the skill to run code or access systems, ask for a version that declares explicit installs and required environment variables so you can review them.
功能分析
Type: OpenClaw Skill Name: flutter-dev Version: 1.0.0 The 'flutter-dev' skill bundle is a comprehensive and legitimate reference guide for Flutter development. It provides standard best practices and code snippets for state management (Riverpod, Bloc), navigation (GoRouter), networking (Dio), and platform-specific integrations. Analysis of the markdown files (SKILL.md and the references directory) revealed no evidence of malicious intent, data exfiltration, or prompt injection; all examples use standard libraries and placeholder URLs (e.g., api.example.com).
能力评估
Purpose & Capability
Name/description (Flutter dev guide) match the contents: reference files and SKILL.md provide widget patterns, state management, navigation, performance, testing, and platform notes. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
SKILL.md and the reference files are purely documentation and code examples. They do not instruct the agent to read system files, access environment variables, contact external endpoints beyond illustrative placeholders (e.g., https://api.example.com), or exfiltrate data.
Install Mechanism
No install spec and no code files that would be executed. Being instruction-only means nothing is downloaded or written to disk during install.
Credentials
No required environment variables, credentials, or config paths are declared or referenced. Code samples use placeholder endpoints and typical package names appropriate for Flutter networking/state management.
Persistence & Privilege
Skill is not always-enabled and does not request persistent agent privileges or modify other skills. Autonomous invocation defaults are unchanged and are not combined with any broad access in this skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install flutter-dev
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /flutter-dev 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the flutter-dev skill. - Provides a comprehensive cross-platform Flutter development guide. - Covers widget patterns, state management with Riverpod/Bloc, GoRouter navigation, and performance optimization. - Includes best practices for const optimization, responsive layouts, and DevTools profiling. - Offers checklists and quick references for widgets, state, navigation, performance, and testing. - References official documentation and community best practices for Flutter, Riverpod, and Bloc.
元数据
Slug flutter-dev
版本 1.0.0
许可证 MIT-0
累计安装 11
当前安装数 11
历史版本数 1
常见问题

Flutter Dev 是什么?

Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platfor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 401 次。

如何安装 Flutter Dev?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install flutter-dev」即可一键安装,无需额外配置。

Flutter Dev 是免费的吗?

是的,Flutter Dev 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Flutter Dev 支持哪些平台?

Flutter Dev 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Flutter Dev?

由 smasherlxd(@smasherlxd)开发并维护,当前版本 v1.0.0。

💬 留言讨论