flutter-ui-ux by ajianaz/skills-collection
npx skills add https://github.com/ajianaz/skills-collection --skill flutter-ui-ux使用现代设计模式和最佳实践,创建美观、响应式且具有动画效果的 Flutter 应用程序。
"移动优先,动画增强,无障碍设计" - 专注于:
| 优先级 | 领域 | 目的 |
|---|---|---|
| 1 | 组件组合 | 可复用、可维护的 UI 组件 |
| 2 | 响应式设计 | 适应所有屏幕尺寸的布局 |
| 3 | 动画 | 流畅、有目的的过渡和微交互 |
| 4 | 自定义主题 | 一致、品牌化的视觉识别 |
| 5 | 性能 | 60fps 渲染和最优资源使用 |
按顺序执行各阶段。完成前一阶段后再进入下一阶段。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
输出:包含组件分解的 UI 需求分析。
输出:组件架构图和组件规范。
组件组合模式:
// ✅ 推荐:组合小型、可复用的组件
class CustomCard extends StatelessWidget {
final Widget child;
final EdgeInsets padding;
const CustomCard({required this.child, this.padding = EdgeInsets.all(16)});
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
child: Padding(padding: padding, child: child),
);
}
}
// ✅ 推荐:尽可能使用 const 构造函数
const Icon(Icons.add) // 优于 Icon(Icons.add)
动画性能规则:
// ✅ 推荐:使用性能优化的动画
AnimatedBuilder(
animation: controller,
builder: (context, child) => Transform.rotate(
angle: controller.value * 2 * math.pi,
child: child, // 传递 child 以避免重建
),
child: const Icon(Icons.refresh),
)
// ❌ 不推荐:动画化昂贵的操作
// 避免动画化复杂布局或重型组件
| 技术 | 使用场景 | 实现 |
|---|---|---|
| LayoutBuilder | 响应式布局 | LayoutBuilder(builder: (context, constraints) => ...) |
| MediaQuery | 屏幕信息 | MediaQuery.of(context).size.width |
| Flexible/Expanded | 弹性布局 | Flexible(child: ...) 或 Expanded(child: ...) |
| AspectRatio | 固定比例 | AspectRatio(aspectRatio: 16/9, child: ...) |
| 类型 | 组件 | 持续时间 | 使用场景 |
|---|---|---|---|
| 淡入淡出 | AnimatedOpacity | 200-300ms | 显示/隐藏内容 |
| 滑动 | SlideTransition | 250-350ms | 屏幕过渡 |
| 缩放 | AnimatedScale | 150-250ms | 按钮按压 |
| 旋转 | RotationTransition | 1000-2000ms | 加载指示器 |
主题化按钮:
class ThemedButton extends StatelessWidget {
final String text;
final VoidCallback onPressed;
const ThemedButton({required this.text, required this.onPressed});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Text(text),
);
}
}
响应式卡片:
class ResponsiveCard extends StatelessWidget {
final Widget child;
const ResponsiveCard({required this.child});
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth > 600) {
return _buildWideLayout(child);
} else {
return _buildNarrowLayout(child);
}
},
);
}
Widget _buildWideLayout(Widget child) {
return Card(
margin: const EdgeInsets.all(16),
child: Padding(padding: const EdgeInsets.all(24), child: child),
);
}
Widget _buildNarrowLayout(Widget child) {
return Card(
margin: const EdgeInsets.all(8),
child: Padding(padding: const EdgeInsets.all(16), child: child),
);
}
}
references/widget-patterns.mdreferences/animation-patterns.mdreferences/theme-templates.mdreferences/performance-optimization.md始终实现:
// 为屏幕阅读器提供语义标签
Semantics(
label: '将商品添加到购物车',
button: true,
child: IconButton(icon: Icon(Icons.add_cart), onPressed: () {}),
)
// 高对比度支持
Theme.of(context).colorScheme.contrast() == Brightness.dark
// 字体缩放
MediaQuery.of(context).accessibleNavigation
const 组件ListView.builderconst 键避免不必要的重建RepaintBoundary这项 Flutter UI/UX 技能将移动应用开发转变为一个系统化的过程,确保创建出美观、响应式、高性能且提供卓越用户体验的应用程序。
每周安装数
95
仓库
GitHub 星标数
1
首次出现
2026年2月17日
安全审计
安装于
gemini-cli95
github-copilot95
codex95
opencode95
cursor95
kimi-cli94
Create beautiful, responsive, and animated Flutter applications with modern design patterns and best practices.
"Mobile-first, animation-enhanced, accessible design" - Focus on:
| Priority | Area | Purpose |
|---|---|---|
| 1 | Widget Composition | Reusable, maintainable UI components |
| 2 | Responsive Design | Adaptive layouts for all screen sizes |
| 3 | Animations | Smooth, purposeful transitions and micro-interactions |
| 4 | Custom Themes | Consistent, branded visual identity |
| 5 | Performance | 60fps rendering and optimal resource usage |
Execute phases sequentially. Complete each before proceeding.
Output: UI requirements analysis with component breakdown.
Output: Widget architecture diagram and component specifications.
Widget Composition Patterns:
// ✅ DO: Compose small, reusable widgets
class CustomCard extends StatelessWidget {
final Widget child;
final EdgeInsets padding;
const CustomCard({required this.child, this.padding = EdgeInsets.all(16)});
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
child: Padding(padding: padding, child: child),
);
}
}
// ✅ DO: Use const constructors where possible
const Icon(Icons.add) // Better than Icon(Icons.add)
Animation Performance Rules:
// ✅ DO: Use performance-optimized animations
AnimatedBuilder(
animation: controller,
builder: (context, child) => Transform.rotate(
angle: controller.value * 2 * math.pi,
child: child, // Pass child to avoid rebuilding
),
child: const Icon(Icons.refresh),
)
// ❌ DON'T: Animate expensive operations
// Avoid animating complex layouts or heavy widgets
| Technique | Use Case | Implementation |
|---|---|---|
| LayoutBuilder | Responsive layouts | LayoutBuilder(builder: (context, constraints) => ...) |
| MediaQuery | Screen info | MediaQuery.of(context).size.width |
| Flexible/Expanded | Flex layouts | Flexible(child: ...) or Expanded(child: ...) |
| AspectRatio | Fixed ratios | AspectRatio(aspectRatio: 16/9, child: ...) |
| Type | Widget | Duration | Use Case |
|---|---|---|---|
| Fade | AnimatedOpacity | 200-300ms | Show/hide content |
| Slide | SlideTransition | 250-350ms | Screen transitions |
| Scale | AnimatedScale | 150-250ms | Button presses |
| Rotation | RotationTransition | 1000-2000ms | Loading indicators |
Themed Button:
class ThemedButton extends StatelessWidget {
final String text;
final VoidCallback onPressed;
const ThemedButton({required this.text, required this.onPressed});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Text(text),
);
}
}
Responsive Card:
class ResponsiveCard extends StatelessWidget {
final Widget child;
const ResponsiveCard({required this.child});
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth > 600) {
return _buildWideLayout(child);
} else {
return _buildNarrowLayout(child);
}
},
);
}
Widget _buildWideLayout(Widget child) {
return Card(
margin: const EdgeInsets.all(16),
child: Padding(padding: const EdgeInsets.all(24), child: child),
);
}
Widget _buildNarrowLayout(Widget child) {
return Card(
margin: const EdgeInsets.all(8),
child: Padding(padding: const EdgeInsets.all(16), child: child),
);
}
}
references/widget-patterns.mdreferences/animation-patterns.mdreferences/theme-templates.mdreferences/performance-optimization.mdAlways implement:
// Semantic labels for screen readers
Semantics(
label: 'Add item to cart',
button: true,
child: IconButton(icon: Icon(Icons.add_cart), onPressed: () {}),
)
// High contrast support
Theme.of(context).colorScheme.contrast() == Brightness.dark
// Font scaling
MediaQuery.of(context).accessibleNavigation
const widgets where possibleListView.builder for long listsconst keysRepaintBoundary for complex animationsThis Flutter UI/UX skill transforms mobile app development into a systematic process that ensures beautiful, responsive, and performant applications with exceptional user experiences.
Weekly Installs
95
Repository
GitHub Stars
1
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubPassSnykWarn
Installed on
gemini-cli95
github-copilot95
codex95
opencode95
cursor95
kimi-cli94
agentation - AI智能体可视化UI反馈工具,连接人眼与代码的桥梁
5,400 周安装
Oracle到PostgreSQL存储过程迁移工具:自动翻译PL/SQL为PL/pgSQL
888 周安装
Oracle到PostgreSQL迁移集成测试规划指南 | 数据库迁移测试自动化
890 周安装
角色设计技能 - 游戏角色设计师AI助手,掌握3A大作与独立游戏角色设计原则
72 周安装
Oracle到PostgreSQL迁移缺陷报告模板 | 数据库迁移问题记录指南
899 周安装
InkOS 多智能体小说创作 CLI 工具:AI 自主写作、审核与修订完整流程
914 周安装
Oracle 到 PostgreSQL 数据库迁移计划自动生成工具 | .NET 解决方案分析
902 周安装