mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 02:42:34 +01:00
fix AudioPlayer state text
This commit is contained in:
parent
16febd3c34
commit
f3b0092bf0
@ -124,7 +124,11 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
|||||||
default:
|
default:
|
||||||
onAudioPositionChanged ??=
|
onAudioPositionChanged ??=
|
||||||
audioPlayer.onAudioPositionChanged.listen((state) {
|
audioPlayer.onAudioPositionChanged.listen((state) {
|
||||||
setState(() => currentPosition = state.inMilliseconds.toDouble());
|
setState(() {
|
||||||
|
statusText =
|
||||||
|
'${state.inMinutes.toString().padLeft(2, '0')}:${(state.inSeconds % 60).toString().padLeft(2, '0')}';
|
||||||
|
currentPosition = state.inMilliseconds.toDouble();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
onDurationChanged ??= audioPlayer.onDurationChanged.listen((max) =>
|
onDurationChanged ??= audioPlayer.onDurationChanged.listen((max) =>
|
||||||
setState(() => maxPosition = max.inMilliseconds.toDouble()));
|
setState(() => maxPosition = max.inMilliseconds.toDouble()));
|
||||||
|
Loading…
Reference in New Issue
Block a user