공개페이지 완료

This commit is contained in:
2025-11-10 14:14:08 +09:00
parent 2ce0b81483
commit ac43ddb55e
67 changed files with 3220 additions and 224696 deletions
+26 -8
View File
@@ -142,7 +142,11 @@ class BadgeStyles {
label = '활성';
bg = successBg;
icon = Icons.check_circle;
} else if (s == 'pending' || s == 'draft' || s == 'scheduled' || s == 'waiting' || s == '대기') {
} else if (s == 'pending' ||
s == 'draft' ||
s == 'scheduled' ||
s == 'waiting' ||
s == '대기') {
label = '대기';
bg = Colors.amber.shade100;
icon = Icons.hourglass_top;
@@ -150,7 +154,10 @@ class BadgeStyles {
label = '취소';
bg = dangerBg;
icon = Icons.cancel;
} else if (s == 'completed' || s == 'done' || s == 'finished' || s == '완료') {
} else if (s == 'completed' ||
s == 'done' ||
s == 'finished' ||
s == '완료') {
label = '완료';
bg = Colors.grey.shade300;
icon = Icons.done_all;
@@ -172,15 +179,26 @@ class BadgeStyles {
final double l2 = lum1 > lum2 ? lum2 : lum1;
return (l1 + 0.05) / (l2 + 0.05);
}
final double contrastWithWhite = contrast(lumBg, Colors.white.computeLuminance());
final double contrastWithBlack = contrast(lumBg, Colors.black.computeLuminance());
final Color fg = contrastWithWhite >= contrastWithBlack ? Colors.white : Colors.black;
final double contrastWithWhite = contrast(
lumBg,
Colors.white.computeLuminance(),
);
final double contrastWithBlack = contrast(
lumBg,
Colors.black.computeLuminance(),
);
final Color fg = contrastWithWhite >= contrastWithBlack
? Colors.white
: Colors.black;
return Chip(
avatar: Icon(icon, size: 16, color: fg),
label: Text(text, style: TextStyle(color: fg)),
avatar: Icon(icon, size: 14, color: fg),
label: Text(text, style: TextStyle(color: fg, fontSize: 11)),
backgroundColor: bg,
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 0),
padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 0),
labelPadding: const EdgeInsets.only(left: -2, right: 5),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
visualDensity: const VisualDensity(horizontal: -3, vertical: -3),
);
}
}