浏览代码

fix video badge

Caijinglong 5 年前
父节点
当前提交
c0c147fdad
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      lib/src/delegate/badge_delegate.dart

+ 3
- 3
lib/src/delegate/badge_delegate.dart 查看文件

@@ -50,9 +50,9 @@ class DurationBadgeDelegate extends BadgeDelegate {
50 50
   @override
51 51
   Widget buildBadge(BuildContext context, AssetType type, Duration duration) {
52 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 57
       String text =
58 58
           "$h:${m.toString().padLeft(2, '0')}:${s.toString().padLeft(2, '0')}";