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

This commit is contained in:
liyi 2025-04-27 11:27:31 +08:00
parent 48d4081b3e
commit 3831083f77

View File

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