修改初始化 弹窗
This commit is contained in:
@@ -77,13 +77,13 @@ class ToastUtils {
|
||||
}
|
||||
|
||||
/// 显示错误提示(红色背景 + 85%不透明度)
|
||||
static void showError(BuildContext context, String message) {
|
||||
static void showError(BuildContext context, String message, {int seconds = 1}) {
|
||||
showToast(
|
||||
context,
|
||||
message,
|
||||
// 红色:0xFFFF5252 → 调整为 0xD9FF5252(D9=85%不透明度)
|
||||
backgroundColor: const Color(0xD9FF5252),
|
||||
duration: const Duration(seconds: 1),
|
||||
duration: Duration(seconds: seconds),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user