728x90
아래와 같이 자주 쓰는 색을 변수로 저장하여, 재사용성이 높아져 코드의 유지보수성이 증가한다.
import 'package:flutter/material.dart';
// Basic Color
const Color kWhiteColor = Color(0xFFFFFFFF);
const Color kBlackColor = Color(0xFF000000);
// System Color
const Color kSystemErrorColor = Color(0xFFFC444F);
const Color kSystemSuccessColor = Color(0xFF30E181);
const Color kSystemWarningColor = Color(0xFFFFD362);
// Color Pallette
const Color kPrimaryColor = Color(0xFF4880EE);
Color kPrimaryColorOp = const Color(0xFF4880EE).withOpacity(0.35);
const Color kIconBackgroundColor = Color(0xFFFAFAFC);
const Color kKakaoBackgroundColor = Color(0xFFFEE500);
const Color kFacebookBackgroundColor = Color(0xFF1E70E9);
// 텍스트 폼
const Color kTextLeftBarColor = Color(0xFF4B6AEA);
const Color kTextBottomBarColor = Color(0xFF5991F4);
const Color kGrayF2 = Color(0xFFF2F3F5);
const Color kGrayF5 = Color(0xFFF5F5F5);
const Color kGrayF8 = Color(0xFFF8F8FA);
const Color kGrayAF = Color(0xFFAFB7BF);
const Color kGray87 = Color(0xFF878B95);
const Color kBlue37 = Color(0xFF3767D3);
// nav
const Color kNavBackground = Color(0xFF1F1F1F);
const Color kPapsText = Color(0xFF3F4656);