fix(client): 修复打印按钮加载后不激活问题
setState 触发重建,确保二维码加载完成后按钮变为可点击。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user