From 6a848ac23e1d95690294074ede25b99a690c3ade Mon Sep 17 00:00:00 2001 From: liyi Date: Sat, 26 Apr 2025 15:16:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE=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, 2 insertions(+), 6 deletions(-) diff --git a/lib/tools/submitBtn.dart b/lib/tools/submitBtn.dart index 01511077..81a57c62 100755 --- a/lib/tools/submitBtn.dart +++ b/lib/tools/submitBtn.dart @@ -53,15 +53,11 @@ class SubmitBtn extends StatelessWidget { ), child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: isDisabled == false + backgroundColor: isDisabled == true ? AppColors.btnDisableColor : (isDelete == true ? Colors.red : AppColors.mainColor), ), - onPressed: () { - if (onClick != null) { - onClick!(); - } - }, + onPressed: isDisabled == true ? null : onClick, child: Text( btnName!, textAlign: TextAlign.center, // 文本居中对齐