fix:调整禁用按钮逻辑

This commit is contained in:
liyi 2025-04-26 15:16:02 +08:00
parent 3a262d80dd
commit 6a848ac23e

View File

@ -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, //