이벤트 가져오기 위젯 테스트 추가 및 테스트 훅 도입

This commit is contained in:
2025-09-12 06:33:44 +09:00
parent 107abc963f
commit a5f2544d11
121 changed files with 39277 additions and 3911 deletions
+7 -7
View File
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
/// PrimeVue 스타일의 뱃지 위젯
///
///
/// [label] - 뱃지에 표시할 텍스트
/// [color] - 뱃지의 배경색
/// [icon] - 뱃지 앞에 표시할 아이콘 (선택사항)
@@ -19,7 +19,7 @@ class PrimeBadge extends StatelessWidget {
final bool rounded;
const PrimeBadge({
Key? key,
super.key,
required this.label,
this.color,
this.icon,
@@ -27,22 +27,22 @@ class PrimeBadge extends StatelessWidget {
this.size = 'normal',
this.outlined = false,
this.rounded = true,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
// 색상 결정 (severity 또는 직접 지정된 색상)
Color backgroundColor = _getBackgroundColor();
Color textColor = _getTextColor(backgroundColor);
// 크기에 따른 패딩 및 폰트 크기 설정
EdgeInsets padding = _getPadding();
double fontSize = _getFontSize();
double iconSize = _getIconSize();
// 테두리 반경 설정
double borderRadius = rounded ? 16.0 : 4.0;
return Container(
padding: padding,
decoration: BoxDecoration(
@@ -78,7 +78,7 @@ class PrimeBadge extends StatelessWidget {
if (color != null) {
return color!;
}
switch (severity) {
case 'info':
return Colors.blue;