From 4c6fea124279fa3a1ea8e394951ab2f3559bc3b8 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 6 Aug 2025 18:49:04 +0800 Subject: [PATCH] :lipstick: Optimize cloud video --- lib/widgets/content/cloud_files.dart | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/widgets/content/cloud_files.dart b/lib/widgets/content/cloud_files.dart index 4c74307..bfea895 100644 --- a/lib/widgets/content/cloud_files.dart +++ b/lib/widgets/content/cloud_files.dart @@ -102,6 +102,7 @@ class CloudVideoWidget extends HookConsumerWidget { Symbols.play_arrow, fill: 1, size: 32, + color: Colors.white, shadows: [ BoxShadow( color: Colors.black54, @@ -113,6 +114,26 @@ class CloudVideoWidget extends HookConsumerWidget { ), ), ), + Positioned( + bottom: 0, + left: 0, + right: 0, + child: IgnorePointer( + child: Container( + height: 100, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Theme.of(context).colorScheme.surface.withOpacity(0.85), + Colors.transparent, + ], + ), + ), + ), + ), + ), Positioned( bottom: 0, left: 0, @@ -132,6 +153,7 @@ class CloudVideoWidget extends HookConsumerWidget { .toInt(), ).formatDuration(), style: TextStyle( + color: Colors.white, shadows: [ BoxShadow( color: Colors.black54, @@ -146,6 +168,7 @@ class CloudVideoWidget extends HookConsumerWidget { Text( '${int.parse(item.fileMeta?['bit_rate'] as String) ~/ 1000} Kbps', style: TextStyle( + color: Colors.white, shadows: [ BoxShadow( color: Colors.black54, @@ -160,7 +183,10 @@ class CloudVideoWidget extends HookConsumerWidget { ), Text( item.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, style: TextStyle( + color: Colors.white, fontWeight: FontWeight.bold, shadows: [ BoxShadow(