장비관리 화면을 기준으로 전체 화면 UI 일관성 개선: - 모든 화면 검색바/버튼/드롭다운 높이 40px 통일 - 테이블 헤더 패딩 vertical 10px, 행 패딩 vertical 4px 통일 - 배지 스타일 통일 (border 제거, opacity 0.9 적용) - 페이지네이션 10개 이하에서도 항상 표시 - 테이블 헤더 폰트 스타일 통일 (fontSize: 13, fontWeight: w500) 각 화면별 수정사항: 1. 장비관리: 컬럼 너비 최적화, 검색 컴포넌트 높이 명시 2. 입고지 관리: 페이지네이션 조건 개선 3. 회사관리: UnifiedSearchBar 통합, 배지 스타일 개선 4. 유지보수: ListView.builder → map() 변경, 테이블 구조 재설계 키포인트 색상을 teal로 통일하여 브랜드 일관성 확보
297 lines
9.5 KiB
Dart
297 lines
9.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
/// shadcn/ui 스타일 테마 시스템
|
|
class ShadcnTheme {
|
|
// Teal 기반 색상 시스템
|
|
static const Color background = Color(0xFFFFFFFF);
|
|
static const Color foreground = Color(0xFF0F172A);
|
|
static const Color card = Color(0xFFFFFFFF);
|
|
static const Color cardForeground = Color(0xFF0F172A);
|
|
static const Color popover = Color(0xFFFFFFFF);
|
|
static const Color popoverForeground = Color(0xFF0F172A);
|
|
static const Color primary = Color(0xFF0D9488); // teal-600
|
|
static const Color primaryForeground = Color(0xFFFFFFFF);
|
|
static const Color secondary = Color(0xFFF0FDFA); // teal-50
|
|
static const Color secondaryForeground = Color(0xFF134E4A); // teal-900
|
|
static const Color muted = Color(0xFFF1F5F9); // slate-100
|
|
static const Color mutedForeground = Color(0xFF64748B); // slate-500
|
|
static const Color accent = Color(0xFF14B8A6); // teal-500
|
|
static const Color accentForeground = Color(0xFFFFFFFF);
|
|
static const Color destructive = Color(0xFFEF4444); // red-500
|
|
static const Color destructiveForeground = Color(0xFFFFFFFF);
|
|
static const Color border = Color(0xFFE5E7EB); // gray-200 (기본 border는 연한 회색)
|
|
static const Color input = Color(0xFFE5E7EB); // gray-200
|
|
static const Color ring = Color(0xFF14B8A6); // teal-500
|
|
static const Color radius = Color(0xFF000000); // 사용하지 않음
|
|
|
|
// Teal 그라데이션 색상
|
|
static const Color gradient1 = Color(0xFF14B8A6); // teal-500
|
|
static const Color gradient2 = Color(0xFF0D9488); // teal-600
|
|
static const Color gradient3 = Color(0xFF0F766E); // teal-700
|
|
|
|
// 상태 색상
|
|
static const Color success = Color(0xFF10B981); // emerald-500
|
|
static const Color warning = Color(0xFFF59E0B); // amber-500
|
|
static const Color error = Color(0xFFEF4444); // red-500
|
|
static const Color info = Color(0xFF0891B2); // cyan-600
|
|
|
|
// 추가 색상 (회사 구분용)
|
|
static const Color blue = Color(0xFF3B82F6); // blue-500
|
|
static const Color purple = Color(0xFF8B5CF6); // purple-500
|
|
static const Color green = Color(0xFF22C55E); // green-500
|
|
|
|
// 그림자 설정
|
|
static List<BoxShadow> get cardShadow => [
|
|
BoxShadow(
|
|
color: primary.withValues(alpha: 0.08),
|
|
blurRadius: 8,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
BoxShadow(
|
|
color: Colors.black.withValues(alpha: 0.04),
|
|
blurRadius: 16,
|
|
offset: const Offset(0, 8),
|
|
),
|
|
];
|
|
|
|
static List<BoxShadow> get buttonShadow => [
|
|
BoxShadow(
|
|
color: primary.withValues(alpha: 0.2),
|
|
blurRadius: 4,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
];
|
|
|
|
// 간격 시스템
|
|
static const double spacing1 = 4.0;
|
|
static const double spacing2 = 8.0;
|
|
static const double spacing3 = 12.0;
|
|
static const double spacing4 = 16.0;
|
|
static const double spacing5 = 20.0;
|
|
static const double spacing6 = 24.0;
|
|
static const double spacing8 = 32.0;
|
|
static const double spacing10 = 40.0;
|
|
static const double spacing12 = 48.0;
|
|
static const double spacing16 = 64.0;
|
|
static const double spacing20 = 80.0;
|
|
|
|
// 라운드 설정
|
|
static const double radiusNone = 0.0;
|
|
static const double radiusSm = 2.0;
|
|
static const double radiusMd = 6.0;
|
|
static const double radiusLg = 8.0;
|
|
static const double radiusXl = 12.0;
|
|
static const double radius2xl = 16.0;
|
|
static const double radius3xl = 24.0;
|
|
static const double radiusFull = 9999.0;
|
|
|
|
// 타이포그래피 시스템 (통일된 크기)
|
|
static TextStyle get headingH1 => GoogleFonts.inter(
|
|
fontSize: 32,
|
|
fontWeight: FontWeight.w700,
|
|
color: foreground,
|
|
letterSpacing: -0.02,
|
|
);
|
|
|
|
static TextStyle get headingH2 => GoogleFonts.inter(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.w600,
|
|
color: foreground,
|
|
letterSpacing: -0.01,
|
|
);
|
|
|
|
static TextStyle get headingH3 => GoogleFonts.inter(
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w500,
|
|
color: foreground,
|
|
letterSpacing: -0.01,
|
|
);
|
|
|
|
static TextStyle get headingH4 => GoogleFonts.inter(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: foreground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get bodyLarge => GoogleFonts.inter(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
color: foreground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get bodyMedium => GoogleFonts.inter(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
color: foreground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get bodySmall => GoogleFonts.inter(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w400,
|
|
color: mutedForeground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get bodyMuted => GoogleFonts.inter(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
color: mutedForeground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get labelLarge => GoogleFonts.inter(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
color: foreground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get labelMedium => GoogleFonts.inter(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w500,
|
|
color: foreground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
static TextStyle get labelSmall => GoogleFonts.inter(
|
|
fontSize: 10,
|
|
fontWeight: FontWeight.w500,
|
|
color: mutedForeground,
|
|
letterSpacing: 0,
|
|
);
|
|
|
|
// Flutter 테마 데이터
|
|
static ThemeData get lightTheme {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: const ColorScheme.light(
|
|
primary: primary,
|
|
secondary: secondary,
|
|
surface: background,
|
|
surfaceContainerHighest: card,
|
|
onSurface: foreground,
|
|
onPrimary: primaryForeground,
|
|
onSecondary: secondaryForeground,
|
|
error: destructive,
|
|
onError: destructiveForeground,
|
|
outline: border,
|
|
outlineVariant: input,
|
|
),
|
|
scaffoldBackgroundColor: background,
|
|
textTheme: TextTheme(
|
|
headlineLarge: headingH1,
|
|
headlineMedium: headingH2,
|
|
headlineSmall: headingH3,
|
|
titleLarge: headingH4,
|
|
bodyLarge: bodyLarge,
|
|
bodyMedium: bodyMedium,
|
|
bodySmall: bodySmall,
|
|
labelLarge: labelLarge,
|
|
labelMedium: labelMedium,
|
|
labelSmall: labelSmall,
|
|
),
|
|
appBarTheme: AppBarTheme(
|
|
backgroundColor: background,
|
|
foregroundColor: foreground,
|
|
elevation: 0,
|
|
scrolledUnderElevation: 1,
|
|
shadowColor: Colors.black.withValues(alpha: 0.1),
|
|
surfaceTintColor: Colors.transparent,
|
|
titleTextStyle: headingH4,
|
|
iconTheme: const IconThemeData(color: foreground),
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: card,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(radiusLg),
|
|
side: const BorderSide(color: border, width: 1),
|
|
),
|
|
shadowColor: Colors.black.withValues(alpha: 0.05),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: primary,
|
|
foregroundColor: primaryForeground,
|
|
elevation: 0,
|
|
shadowColor: Colors.transparent,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
),
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: spacing4,
|
|
vertical: spacing2,
|
|
),
|
|
textStyle: labelMedium,
|
|
),
|
|
),
|
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: foreground,
|
|
side: const BorderSide(color: border),
|
|
elevation: 0,
|
|
shadowColor: Colors.transparent,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
),
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: spacing4,
|
|
vertical: spacing2,
|
|
),
|
|
textStyle: labelMedium,
|
|
),
|
|
),
|
|
textButtonTheme: TextButtonThemeData(
|
|
style: TextButton.styleFrom(
|
|
foregroundColor: foreground,
|
|
elevation: 0,
|
|
shadowColor: Colors.transparent,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
),
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: spacing4,
|
|
vertical: spacing2,
|
|
),
|
|
textStyle: labelMedium,
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: background,
|
|
contentPadding: const EdgeInsets.symmetric(
|
|
horizontal: spacing3,
|
|
vertical: spacing2,
|
|
),
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
borderSide: const BorderSide(color: input),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
borderSide: const BorderSide(color: input),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
borderSide: const BorderSide(color: ring, width: 2),
|
|
),
|
|
errorBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
borderSide: const BorderSide(color: destructive),
|
|
),
|
|
focusedErrorBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(radiusMd),
|
|
borderSide: const BorderSide(color: destructive, width: 2),
|
|
),
|
|
hintStyle: bodyMedium.copyWith(color: mutedForeground),
|
|
labelStyle: labelMedium,
|
|
),
|
|
dividerTheme: const DividerThemeData(color: border, thickness: 1),
|
|
);
|
|
}
|
|
}
|