fix(client): 修复打印按钮加载后不激活问题

setState 触发重建,确保二维码加载完成后按钮变为可点击。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-04-30 19:30:11 +08:00
parent 1747c58246
commit 6923a0585c
@@ -519,7 +519,9 @@ class _QRCodeDialogState extends ConsumerState<_QRCodeDialog> {
_future = ref
.read(productRepositoryProvider)
.getQRCodeBytes(widget.productId)
..then((b) => _bytes = b);
..then((b) {
if (mounted) setState(() => _bytes = b);
});
}
Future<void> _print() async {