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( child: ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: isDisabled == false backgroundColor: isDisabled == true
? AppColors.btnDisableColor ? AppColors.btnDisableColor
: (isDelete == true ? Colors.red : AppColors.mainColor), : (isDelete == true ? Colors.red : AppColors.mainColor),
), ),
onPressed: () { onPressed: isDisabled == true ? null : onClick,
if (onClick != null) {
onClick!();
}
},
child: Text( child: Text(
btnName!, btnName!,
textAlign: TextAlign.center, // textAlign: TextAlign.center, //