Fix string concatenation for error messages in audio playback handling
This commit is contained in:
@@ -128,8 +128,7 @@ class _AudioPlayerBarState extends State<AudioPlayerBar>
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_errorMsg =
|
_errorMsg =
|
||||||
'Audio playback error: ' +
|
'Audio playback error: ${e is Exception ? e.toString() : 'Unknown error'}';
|
||||||
(e is Exception ? e.toString() : 'Unknown error');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -155,8 +154,7 @@ class _AudioPlayerBarState extends State<AudioPlayerBar>
|
|||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
_errorMsg =
|
_errorMsg =
|
||||||
'Audio load error: ' +
|
'Audio load error: ${e is Exception ? e.toString() : 'Unknown error'}';
|
||||||
(e is Exception ? e.toString() : 'Unknown error');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user