Browse Source

fix video badge

Caijinglong 5 years ago
parent
commit
c0c147fdad
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      lib/src/delegate/badge_delegate.dart

+ 3
- 3
lib/src/delegate/badge_delegate.dart View File

50
   @override
50
   @override
51
   Widget buildBadge(BuildContext context, AssetType type, Duration duration) {
51
   Widget buildBadge(BuildContext context, AssetType type, Duration duration) {
52
     if (type == AssetType.video) {
52
     if (type == AssetType.video) {
53
-      var s = duration.inSeconds;
54
-      var m = duration.inMinutes;
55
-      var h = duration.inHours;
53
+      var s = duration.inSeconds % 60;
54
+      var m = duration.inMinutes % 60;
55
+      var h = duration.inHours ;
56
 
56
 
57
       String text =
57
       String text =
58
           "$h:${m.toString().padLeft(2, '0')}:${s.toString().padLeft(2, '0')}";
58
           "$h:${m.toString().padLeft(2, '0')}:${s.toString().padLeft(2, '0')}";