final ValueNotifier<String> _sendBtnValueListenable =
ValueNotifier<String>('发送红包');
_sendBtnValueListenable.value = '发送中...';
ValueListenableBuilder(
valueListenable: _sendBtnValueListenable,
builder:
(BuildContext context, String value, Widget? child) {
return CustomButton(
onPress: () {
if (isSending) {
return;
}
_sendRedEveRequest(context);
},
textSize: 18.0.sp,
textColor: Colors.white,
text: S.current.lucky_bag_send,
textAlignment: Alignment.center,
);
}),
flutter 监听器ValueListenableBuilder
最新推荐文章于 2024-05-16 22:50:13 发布