fix:回复按钮原有的禁用逻辑

This commit is contained in:
liyi 2025-04-27 11:27:31 +08:00
parent db2fe012d7
commit ea96419e05

View File

@ -53,11 +53,15 @@ class SubmitBtn extends StatelessWidget {
), ),
child: ElevatedButton( child: ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: isDisabled == true backgroundColor: isDisabled == false
? AppColors.btnDisableColor ? AppColors.btnDisableColor
: (isDelete == true ? Colors.red : AppColors.mainColor), : (isDelete == true ? Colors.red : AppColors.mainColor),
), ),
onPressed: isDisabled == true ? null : onClick, onPressed: () {
if (onClick != null) {
onClick!();
}
},
child: Text( child: Text(
btnName!, btnName!,
textAlign: TextAlign.center, // textAlign: TextAlign.center, //