opt dyn badge

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-31 17:56:29 +08:00
parent b990f9cf87
commit 6147df2030
6 changed files with 49 additions and 19 deletions

View File

@@ -59,8 +59,13 @@ class PBadge extends StatelessWidget {
bgColor = Colors.black45;
color = Colors.white;
case PBadgeType.error:
bgColor = theme.error;
color = theme.onError;
if (Get.isDarkMode) {
bgColor = theme.errorContainer;
color = theme.onErrorContainer;
} else {
bgColor = theme.error;
color = theme.onError;
}
case PBadgeType.line_primary:
color = theme.primary;
bgColor = Colors.transparent;