[mob][cast] Fix cast progress state

This commit is contained in:
Neeraj Gupta 2024-05-06 14:41:52 +05:30
parent 1d1ee1248c
commit d779fc05bd
2 changed files with 6 additions and 6 deletions

View file

@ -79,12 +79,6 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
});
try {
await _connectToYourApp(context, device);
if (mounted) {
setState(() {
_isDeviceTapInProgress.remove(device);
});
Navigator.of(context).pop();
}
} catch (e) {
if (mounted) {
setState(() {
@ -128,6 +122,11 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
final code = message[CastMessageType.pairCode]!['code'];
widget.onConnect(code);
}
if (mounted) {
setState(() {
_isDeviceTapInProgress.remove(castDevice);
});
}
},
);
}

View file

@ -758,6 +758,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
return AutoCastDialog(
(device) async {
await _castPair(bContext, gw, device);
Navigator.pop(bContext);
},
);
},