progress visibility on item page

This commit is contained in:
Dr-Blank 2024-06-16 22:24:32 -04:00
parent be7f5daa88
commit 865a662b56
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
21 changed files with 1009 additions and 765 deletions

View file

@ -0,0 +1,11 @@
extension DurationFormat on Duration {
/// formats the duration of the book as `10h 30m`
///
/// will add up all the durations of the audio files first
/// then convert them to the given format
String get formattedBinary {
final hours = inHours;
final minutes = inMinutes.remainder(60);
return '${hours}h ${minutes}m';
}
}