Flutter Development

aj-geddes/useful-ai-prompts/skills/flutter-development

作者 aj-geddes3f5182cfd739无许可证355 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7个月前更新

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

AI 生成的概览

指导使用 Flutter 和 Dart 构建跨平台移动应用,涵盖组件、状态管理、导航与 API 集成。

功能
提供使用 Dart 构建 Flutter 移动应用的指导,涵盖组件组合、使用 Provider 或 BLoC 的状态管理、导航、API 集成与 Material Design。内容包括快速入门示例、关于项目结构、导航和 Provider 状态管理的参考指南,以及一个组件模板。还列出了性能、测试和响应式设计方面的最佳实践。
适用场景
适用于使用 Flutter 构建 iOS 和 Android 应用、设计基于组件的自定义界面、实现动画,或搭建导航与状态管理时。也适合希望获得一致跨平台体验并借助热重载快速迭代的团队。
运行要求
不含脚本,仅提供说明与参考文档。所述项目需要 Flutter SDK 和 Dart,以及 provider、http、go_router 等软件包,API 集成还需要网络访问。

Flutter Development

Table of Contents

Overview

Create high-performance, visually stunning mobile applications using Flutter with Dart language. Master widget composition, state management patterns, navigation, and API integration.

When to Use

  • Building iOS and Android apps with native performance
  • Designing custom UIs with Flutter's widget system
  • Implementing complex animations and visual effects
  • Rapid app development with hot reload
  • Creating consistent UX across platforms

Quick Start

Minimal working example:

dart
// pubspec.yamlname: my_flutter_appversion: 1.0.0
dependencies:  flutter:    sdk: flutter  provider: ^6.0.0  http: ^1.1.0  go_router: ^12.0.0
// main.dart with GoRouter navigationimport 'package:flutter/material.dart';import 'package:go_router/go_router.dart';
void main() {  runApp(const MyApp());}
class MyApp extends StatelessWidget {  const MyApp({Key? key}) : super(key: key);
  @override  Widget build(BuildContext context) {    return MaterialApp.router(// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Project Structure & Navigation [blocked]Project Structure & Navigation
State Management with Provider [blocked]State Management with Provider
Screens with Provider Integration [blocked]Screens with Provider Integration

Best Practices

✅ DO

  • Use widgets for every UI element
  • Implement proper state management
  • Use const constructors where possible
  • Dispose resources in state lifecycle
  • Test on multiple device sizes
  • Use meaningful widget names
  • Implement error handling
  • Use responsive design patterns
  • Test on both iOS and Android
  • Document custom widgets

❌ DON'T

  • Build entire screens in build() method
  • Use setState for complex state logic
  • Make network calls in build()
  • Ignore platform differences
  • Create overly nested widget trees
  • Hardcode strings
  • Ignore performance warnings
  • Skip testing
  • Forget to handle edge cases
  • Deploy without thorough testing

来源与署名

来源:aj-geddes/useful-ai-prompts位于skills/flutter-development提交3f5182c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架