Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hrmoh committed Dec 10, 2023
1 parent 52a701e commit 992442e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/widgets/audio_player_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ class ControlButtons extends StatelessWidget {
iconSize: 64.0,
onPressed: () async {
var service = RecitationService();
if (narration.verses == null) {
loadingStateChanged(true);
var res = await service.getVerses(narration.id);
loadingStateChanged(false);
if (res.item2.isNotEmpty) {
snackbarNeeded(res.item2);
} else {
narration.verses = res.item1;
}
}
await player.setUrl(service.getAudioFileUrl(narration.id));
await player.play();
},
Expand Down

0 comments on commit 992442e

Please sign in to comment.