fix:回复按钮原有的禁用逻辑
This commit is contained in:
parent
db2fe012d7
commit
ea96419e05
@ -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, // 文本居中对齐
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user