mod: show dyn gif emote

mod: emote tabbar

opt: video progress indicator

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-11 18:12:19 +08:00
parent 4267a3b8e0
commit a9ba30b9b9
5 changed files with 11 additions and 7 deletions

View File

@@ -4,11 +4,11 @@ Widget videoProgressIndicator(double progress) => ClipRect(
clipper: ProgressClipper(),
child: ClipRRect(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(12),
bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10),
),
child: LinearProgressIndicator(
minHeight: 12,
minHeight: 10,
value: progress,
),
),
@@ -17,7 +17,7 @@ Widget videoProgressIndicator(double progress) => ClipRect(
class ProgressClipper extends CustomClipper<Rect> {
@override
Rect getClip(Size size) {
return Rect.fromLTWH(0, 8, size.width, size.height - 8);
return Rect.fromLTWH(0, 6, size.width, size.height - 6);
}
@override

View File

@@ -638,11 +638,15 @@ class Emoji {
});
String? iconUrl;
String? webpUrl;
String? gifUrl;
double? size;
String? text;
int? type;
Emoji.fromJson(Map<String, dynamic> json) {
iconUrl = json['icon_url'];
webpUrl = json['webp_url'];
gifUrl = json['gif_url'];
size = json['size'].toDouble();
text = json['text'];
type = json['type'];

View File

@@ -153,7 +153,7 @@ InlineSpan? richNode(item, context) {
spanChildren.add(
WidgetSpan(
child: NetworkImgLayer(
src: i.emoji!.iconUrl,
src: i.emoji!.webpUrl ?? i.emoji!.gifUrl ?? i.emoji!.iconUrl,
type: 'emote',
width: (i.emoji!.size ?? 1) * 20,
height: (i.emoji!.size ?? 1) * 20,

View File

@@ -95,6 +95,7 @@ class _EmotePanelState extends State<EmotePanel>
),
TabBar(
controller: _emotePanelController.tabController,
padding: const EdgeInsets.only(right: 60),
dividerColor: Colors.transparent,
isScrollable: true,
tabs: (loadingState.response as List<Packages>)

View File

@@ -186,7 +186,6 @@ class HistoryItem extends StatelessWidget {
return Stack(
children: [
NetworkImgLayer(
radius: 12,
src: (videoItem.cover != ''
? videoItem.cover
: videoItem.covers.first),
@@ -228,7 +227,7 @@ class HistoryItem extends StatelessWidget {
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(10),
color: Colors.black.withOpacity(0.6),
),
child: SizedBox(