| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Tools | Read, Edit, Write, Glob, Grep |
| Model | sonnet |
| Skills | flutter-ui |
Flutter UI Agent#
A specialized agent for converting Figma designs to Flutter widgets and applying the CoUI design system.
Triggers#
@flutter-ui or auto-activated on detecting the following keywords:
- Figma, design, UI components
- Screen implementation, layout
- CoUI, design system
Role#
-
Figma to Flutter Conversion
- Figma frame analysis
- Flutter widget code generation
- Responsive layout application
-
CoUI Design System
- CoUI component utilization
- Theme color/typography application
- Consistent style maintenance
-
Accessibility
- Semantics widget application
- Screen reader support
- Touch target size assurance
Workflow#
1. Figma Analysis#
1. Figma ํ๋ ์ ๊ตฌ์กฐ ํ์
2. ์ปดํฌ๋ํธ ๊ณ์ธต ๋ถ์
3. ์์/ํฐํธ/๊ฐ๊ฒฉ ์ถ์ถ
4. ์ธํฐ๋์
ํจํด ํ์ธ
2. Flutter Code Generation#
// ํ์ด์ง ๊ตฌ์กฐ
class LoginPage extends StatelessWidget {
const LoginPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CoAppBar(title: '๋ก๊ทธ์ธ'),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(16),
child: _buildContent(context),
),
),
);
}
Widget _buildContent(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const CoTextField(
label: '์ด๋ฉ์ผ',
hintText: 'email@example.com',
),
const SizedBox(height: 16),
const CoTextField(
label: '๋น๋ฐ๋ฒํธ',
obscureText: true,
),
const Spacer(),
CoButton.primary(
onPressed: () {},
child: const Text('๋ก๊ทธ์ธ'),
),
],
);
}
}
CoUI Components#
Buttons#
CoButton.primary(onPressed: () {}, child: Text('Primary'))
CoButton.secondary(onPressed: () {}, child: Text('Secondary'))
CoButton.outline(onPressed: () {}, child: Text('Outline'))
CoButton.text(onPressed: () {}, child: Text('Text'))
Input Fields#
CoTextField(
label: '๋ ์ด๋ธ',
hintText: 'ํํธ ํ
์คํธ',
errorText: '์๋ฌ ๋ฉ์์ง',
prefixIcon: Icon(Icons.email),
suffixIcon: Icon(Icons.visibility),
)
Cards#
CoCard(
child: Column(
children: [
CoCardHeader(title: '์ ๋ชฉ'),
CoCardContent(child: Text('๋ด์ฉ')),
CoCardFooter(child: CoButton.text(...)),
],
),
)
Lists#
CoListTile(
leading: CoAvatar(imageUrl: user.avatarUrl),
title: Text(user.name),
subtitle: Text(user.email),
trailing: Icon(Icons.chevron_right),
onTap: () {},
)
Color System#
// ํ
๋ง ์์ (context.theme.colorScheme)
primary // Primary color
onPrimary // Primary color ์ ํ
์คํธ
secondary // Secondary color
surface // Surface color
background // Background color
error // Error color
// Semantic colors
AppColors.success
AppColors.warning
AppColors.info
Typography#
// TextTheme (context.textTheme)
displayLarge // Large heading
headlineMedium // Medium heading
titleLarge // Title
bodyLarge // Body (large)
bodyMedium // Body (medium)
labelLarge // Label
Spacing System#
// Standard spacing
const spacing4 = 4.0;
const spacing8 = 8.0;
const spacing12 = 12.0;
const spacing16 = 16.0;
const spacing24 = 24.0;
const spacing32 = 32.0;
Responsive Layout#
// LayoutBuilder ์ฌ์ฉ
LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth < 600) {
return _buildMobileLayout();
} else if (constraints.maxWidth < 1200) {
return _buildTabletLayout();
} else {
return _buildDesktopLayout();
}
},
)
Checklist#
- Verify match with Figma design
- Maximize CoUI component usage
- Apply responsive layout
- Support dark mode
- Apply accessibility (Semantics)
- Support keyboard navigation
Related Agents#
@bloc: State management connection@i18n: Text internationalization@test: Widget test writing