Open costaalex opened 3 years ago
When the chapter finishes and another one begins naturally, the app crushes because there is a division by 0 in the slider. Solved by adding 1 millisecond to the denominator so it doesn't start with 0:
components/player.dart file, row 402: value: position.inMilliseconds / duration.inMilliseconds, changed to value: position.inMilliseconds / (duration.inMilliseconds + 1),
value: position.inMilliseconds / duration.inMilliseconds,
value: position.inMilliseconds / (duration.inMilliseconds + 1),
Actually the solution above doesn't solve the problem completely. Sometimes it crashes anyway when a new chapter begins
When the chapter finishes and another one begins naturally, the app crushes because there is a division by 0 in the slider. Solved by adding 1 millisecond to the denominator so it doesn't start with 0:
components/player.dart file, row 402:
value: position.inMilliseconds / duration.inMilliseconds,
changed tovalue: position.inMilliseconds / (duration.inMilliseconds + 1),