From ea96419e05d2f0911b872d13cc4fdabf70290384 Mon Sep 17 00:00:00 2001 From: liyi Date: Sun, 27 Apr 2025 11:27:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9B=9E=E5=A4=8D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E7=9A=84=E7=A6=81=E7=94=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tools/submitBtn.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/tools/submitBtn.dart b/lib/tools/submitBtn.dart index 81a57c62..01511077 100755 --- a/lib/tools/submitBtn.dart +++ b/lib/tools/submitBtn.dart @@ -53,11 +53,15 @@ class SubmitBtn extends StatelessWidget { ), child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: isDisabled == true + backgroundColor: isDisabled == false ? AppColors.btnDisableColor : (isDelete == true ? Colors.red : AppColors.mainColor), ), - onPressed: isDisabled == true ? null : onClick, + onPressed: () { + if (onClick != null) { + onClick!(); + } + }, child: Text( btnName!, textAlign: TextAlign.center, // 文本居中对齐