flutter-frontend-design
npx skills add https://github.com/syeduzaif/flutter-frontend-design --skill flutter-frontend-design
Agent 安装分布
Skill 文档
Flutter Frontend Design Skill
This skill guides creation of distinctive, production-grade Flutter interfaces that avoid generic “AI slop” aesthetics. Implement real working Flutter/Dart code with exceptional attention to aesthetic details and creative choices.
The user provides Flutter UI requirements: a screen, widget, component, or full app to build. They may include context about the purpose, audience, platform targets, or technical constraints.
Design Thinking (Before Coding)
Before writing any Dart code, understand the context and commit to a BOLD aesthetic direction:
- Purpose: What problem does this interface solve? Who uses it? Mobile-first? Tablet? Web?
- Tone: Pick a strong direction: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, glassmorphism, neumorphism, claymorphism, etc.
- Platform: Material 3, Cupertino, or custom design system? Adaptive UI?
- Constraints: State management (Riverpod, Bloc, Provider, GetX), navigation (GoRouter, auto_route), target platforms.
- Differentiation: What makes this UNFORGETTABLE? What’s the one thing someone will remember?
CRITICAL: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work â the key is intentionality, not intensity.
Flutter Architecture Patterns
Always follow these Flutter-specific patterns:
Widget Structure
lib/
âââ main.dart
âââ app.dart # MaterialApp / CupertinoApp config
âââ core/
â âââ theme/
â â âââ app_theme.dart # ThemeData definitions
â â âââ app_colors.dart # Color constants & extensions
â â âââ app_typography.dart # TextStyle definitions
â â âââ app_spacing.dart # Spacing constants
â âââ constants/
â âââ utils/
âââ features/
â âââ feature_name/
â âââ presentation/
â â âââ screens/
â â âââ widgets/
â â âââ controllers/
â âââ domain/
â âââ data/
âââ shared/
âââ widgets/ # Reusable custom widgets
State Management
- Use
StatefulWidgetfor simple local state - Recommend Riverpod or Bloc for complex state
- Always separate UI from business logic
- Use
ValueNotifier/ChangeNotifierfor lightweight reactive patterns
Responsive Design
// Always think responsive
LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth > 1200) return _desktopLayout();
if (constraints.maxWidth > 600) return _tabletLayout();
return _mobileLayout();
},
)
Flutter Aesthetics Guidelines
Typography
- NEVER use default Material font (Roboto) without customization
- Use Google Fonts package (
google_fonts) for distinctive typography - Pair a bold display font with a refined body font
- Examples of strong pairings:
- Display:
Playfair Display/ Body:Source Sans Pro - Display:
Space Grotesk/ Body:DM Sans - Display:
Cormorant Garamond/ Body:Fira Sans - Display:
Sora/ Body:Inter(when Inter fits the design) - Display:
Clash Display/ Body:Satoshi
- Display:
- Define ALL text styles in
AppTypographyclass usingTextThemeextensions
Color & Theme
- Define colors using
ColorScheme.fromSeed()or customColorScheme - Use
ThemeExtension<T>for custom color properties beyond Material - Support BOTH light and dark themes from the start
- CSS variables equivalent â Dart constants +
Theme.of(context).extension<T>() - Dominant colors with sharp accents outperform timid, evenly-distributed palettes
// Example: Strong color system
class AppColors {
// Primary palette
static const primary = Color(0xFF1A1A2E);
static const accent = Color(0xFFE94560);
static const surface = Color(0xFF16213E);
static const background = Color(0xFF0F3460);
// Semantic colors
static const success = Color(0xFF00C897);
static const warning = Color(0xFFFFB800);
static const error = Color(0xFFFF4757);
// Gradients
static const heroGradient = LinearGradient(
colors: [Color(0xFF667eea), Color(0xFF764ba2)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
);
}
Motion & Animation
Flutter excels at animation. Use it:
- Implicit animations:
AnimatedContainer,AnimatedOpacity,AnimatedScale,AnimatedSlide,AnimatedSwitcher - Hero animations: For screen transitions with shared elements
- Staggered animations: Use
IntervalwithAnimationControllerfor orchestrated reveals - Micro-interactions:
GestureDetector+AnimatedScalefor tap feedback - Page transitions: Custom
PageRouteBuilderwithSlideTransition,FadeTransition,ScaleTransition - Lottie: For complex illustrations and loading states (
lottiepackage) - Rive: For interactive vector animations (
rivepackage)
// Staggered list animation example
class StaggeredListItem extends StatelessWidget {
final int index;
final Animation<double> animation;
Widget build(BuildContext context) {
return SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, 0.3),
end: Offset.zero,
).animate(CurvedAnimation(
parent: animation,
curve: Interval(
index * 0.1,
(index * 0.1) + 0.4,
curve: Curves.easeOutCubic,
),
)),
child: FadeTransition(
opacity: animation,
child: child,
),
);
}
}
Spatial Composition
- Use
SliverAppBarwithFlexibleSpaceBarfor immersive scroll effects CustomScrollViewwith mixedSliverwidgets for complex layoutsStack+Positionedfor overlapping elementsTransformfor rotation, skew, perspective effectsClipPath/CustomClipperfor non-rectangular shapesCustomPaint/CustomPainterfor unique backgrounds and decorative elements
Backgrounds & Visual Details
ShaderMaskfor gradient text and masked effectsBackdropFilterwithImageFilter.blurfor glassmorphismCustomPainterfor geometric patterns, noise textures, decorative elementsDecoratedBoxwith complexBoxDecoration(gradients, shadows, borders)ContainerwithBoxShadowlists for layered depth effects- Use
dart:uicanvas operations for grain overlays and mesh gradients
// Glassmorphism card
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
child: Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
borderRadius: BorderRadius.circular(20),
border: Border.all(color: Colors.white.withOpacity(0.2)),
),
child: content,
),
),
)
What to NEVER Do
- NEVER use default Material theme without customization
- NEVER use only
Scaffold+ListView+Cardwith zero styling - NEVER rely solely on Material default colors (purple/teal)
- NEVER ignore dark mode support
- NEVER skip animations entirely â Flutter’s animation system is its superpower
- NEVER hardcode sizes â use
MediaQuery,LayoutBuilder,Flexible,Expanded - NEVER use generic placeholder patterns that look like every other Flutter tutorial
- NEVER ignore platform conventions (iOS users expect Cupertino patterns)
Package Recommendations
| Purpose | Package | Usage |
|---|---|---|
| Fonts | google_fonts |
Typography |
| Icons | flutter_svg, hugeicons, phosphor_flutter |
Custom icon sets |
| Animation | flutter_animate, lottie, rive |
Complex animations |
| Charts | fl_chart, syncfusion_flutter_charts |
Data visualization |
| Effects | shimmer, flutter_blurhash |
Loading & image effects |
| Layout | flutter_staggered_grid_view |
Masonry/staggered grids |
| Navigation | go_router, auto_route |
Declarative routing |
| State | flutter_riverpod, flutter_bloc |
State management |
| Images | cached_network_image, extended_image |
Image loading & caching |
Delivery Format
When building Flutter UI:
- Single widget/screen: Provide complete
.dartfile with imports - Multi-screen feature: Provide folder structure + all files
- Full app: Provide
pubspec.yaml+ completelib/structure - Always include
pubspec.yamldependencies when using external packages - Code must compile and run â no pseudo-code or incomplete snippets
- Include comments explaining non-obvious design decisions
Quality Checklist
Before delivering Flutter UI code, verify:
- Custom
ThemeDatawith unique colors and typography - Responsive layout (mobile + tablet minimum)
- At least 2-3 meaningful animations or transitions
- Dark mode support or explicit dark/light theme
- Proper widget extraction (no mega-build methods)
- Performance considerations (
constconstructors,RepaintBoundarywhere needed) - Accessibility (
Semanticswidgets, sufficient contrast ratios) - Platform-adaptive elements where appropriate
Remember: Flutter gives you a pixel-perfect canvas with 120fps animations. Don’t hold back â show what can truly be created when committing fully to a distinctive vision.