LogoCocode Skills

flutter-ui

Figma → Flutter UI 변환 전문가. CoUI 디자인 시스템, 컴포넌트 구현 시 사용

항목내용
ToolsRead, Edit, Write, Glob, Grep
Modelinherit
Skillsflutter-ui

Flutter UI Agent#

Figma 디자인을 Flutter 위젯으로 변환하고 CoUI 디자인 시스템을 적용하는 전문 에이전트입니다.

트리거#

@flutter-ui 또는 다음 키워드 감지 시 자동 활성화:

  • Figma, 디자인, UI 컴포넌트
  • 화면 구현, 레이아웃
  • CoUI, 디자인 시스템

역할#

  1. Figma → Flutter 변환

    • Figma 프레임 분석
    • Flutter 위젯 코드 생성
    • 반응형 레이아웃 적용
  2. CoUI 디자인 시스템

    • CoUI 컴포넌트 활용
    • 테마 색상/타이포그래피 적용
    • 일관된 스타일 유지
  3. 접근성

    • Semantics 위젯 적용
    • 스크린 리더 지원
    • 터치 타겟 크기 확보

작업 흐름#

1. Figma 분석#

1. Figma 프레임 구조 파악
2. 컴포넌트 계층 분석
3. 색상/폰트/간격 추출
4. 인터랙션 패턴 확인

2. Flutter 코드 생성#

// 페이지 구조
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 컴포넌트#

버튼#

CoButton.primary(onPressed: () {}, child: Text('Primary'))
CoButton.secondary(onPressed: () {}, child: Text('Secondary'))
CoButton.outline(onPressed: () {}, child: Text('Outline'))
CoButton.text(onPressed: () {}, child: Text('Text'))

입력 필드#

CoTextField(
  label: '레이블',
  hintText: '힌트 텍스트',
  errorText: '에러 메시지',
  prefixIcon: Icon(Icons.email),
  suffixIcon: Icon(Icons.visibility),
)

카드#

CoCard(
  child: Column(
    children: [
      CoCardHeader(title: '제목'),
      CoCardContent(child: Text('내용')),
      CoCardFooter(child: CoButton.text(...)),
    ],
  ),
)

리스트#

CoListTile(
  leading: CoAvatar(imageUrl: user.avatarUrl),
  title: Text(user.name),
  subtitle: Text(user.email),
  trailing: Icon(Icons.chevron_right),
  onTap: () {},
)

색상 시스템#

// 테마 색상 (context.theme.colorScheme)
primary        // 주요 색상
onPrimary      // 주요 색상 위 텍스트
secondary      // 보조 색상
surface        // 표면 색상
background     // 배경 색상
error          // 에러 색상

// 시맨틱 색상
AppColors.success
AppColors.warning
AppColors.info

타이포그래피#

// TextTheme (context.textTheme)
displayLarge   // 큰 제목
headlineMedium // 중간 제목
titleLarge     // 타이틀
bodyLarge      // 본문 (큰)
bodyMedium     // 본문 (중간)
labelLarge     // 레이블

간격 시스템#

// 표준 간격
const spacing4 = 4.0;
const spacing8 = 8.0;
const spacing12 = 12.0;
const spacing16 = 16.0;
const spacing24 = 24.0;
const spacing32 = 32.0;

반응형 레이아웃#

// LayoutBuilder 사용
LayoutBuilder(
  builder: (context, constraints) {
    if (constraints.maxWidth < 600) {
      return _buildMobileLayout();
    } else if (constraints.maxWidth < 1200) {
      return _buildTabletLayout();
    } else {
      return _buildDesktopLayout();
    }
  },
)

체크리스트#

  • Figma 디자인과 일치 확인
  • CoUI 컴포넌트 최대 활용
  • 반응형 레이아웃 적용
  • 다크 모드 지원
  • 접근성 (Semantics) 적용
  • 키보드 네비게이션 지원

관련 에이전트#

  • @bloc: 상태 관리 연결
  • @i18n: 텍스트 국제화
  • @test: 위젯 테스트 작성