This skill provides best practices for performance rendering, theming, and reusable components in Flutter applications. It's ideal for Flutter developers looking to enhance the efficiency and maintainability of their UI designs.
$ npx skills add https://github.com/dhruvanbhalara/skills --skill flutter-uiThe flutter-ui skill is part of a specialized library of 37 coding agent skills designed for professional Flutter and Dart development. It equips AI coding agents with best practices for optimizing Flutter UI performance, implementing consistent theming systems, and building maintainable reusable components. The skill works seamlessly with Claude Code, Cursor, GitHub Copilot, and other AI agents to help developers write more efficient and scalable Flutter interfaces. By focusing on rendering optimization and component architecture, this skill helps teams reduce UI-related bugs and improve application responsiveness.
Install by running `$ npx skills add https://github.com/dhruvanbhalara/skills --skill flutter-ui`
Improve performance in Flutter apps
Ensure consistent theming across applications
Create reusable UI components
$ npx skills add https://github.com/dhruvanbhalara/skills --skill flutter-uigit clone https://github.com/dhruvanbhalara/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I need best practices for performance rendering, theming, and reusable components in my Flutter application for [COMPANY_NAME]'s [INDUSTRY] project. Here's the current [DATA] I'm working with: [PASTE_RELEVANT_CODE_OR_CONTEXT]. How can I optimize my Flutter UI for better performance and maintainability?
# Flutter UI Optimization Guide for GreenLeaf E-commerce
## Performance Best Practices
- **Widget Reuse**: Replace `Container` with `const` constructors where possible. For example:
```dart
const ProductCard(/*...*/) // Instead of dynamic Container
```
- **State Management**: Use `Provider` or `Riverpod` for complex state instead of `setState` in deep widgets
- **List Views**: Implement `ListView.builder` with estimated item heights for scrollable product listings
## Theming Strategy
- **Dark/Light Mode**: Create a `ThemeData` extension:
```dart
extension ThemeX on BuildContext {
ThemeData get theme => Theme.of(this);
Color get primary => theme.colorScheme.primary;
}
```
- **Typography**: Define text themes in `MaterialApp`:
```dart
theme: ThemeData(
textTheme: TextTheme(
headlineSmall: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)
)
)
```
## Reusable Components
- **Card Templates**: Create a `BaseCard` widget with configurable padding and shadows
- **Button Library**: Standardize primary/secondary buttons with consistent elevation
- **Animation Helpers**: Implement reusable `FadeIn`/`SlideIn` widgets for page transitions
## Key Metrics to Monitor
- FPS: Target 60fps for smooth scrolling
- Memory: Keep widget tree under 200 active widgets
- Bundle Size: Optimize assets with `flutter build apk --split-debug-info`Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan