feat/rewrite: убрал hero анимацию, добавил возможность просмотра тегов у стикеров

This commit is contained in:
Jganenokk
2026-07-05 20:18:29 +07:00
parent 891e4a7957
commit 26eca7aae4
7 changed files with 116 additions and 164 deletions
+13
View File
@@ -38,6 +38,7 @@ class StickerItem {
final int? setId;
final int? width;
final int? height;
final List<String> tags;
const StickerItem({
required this.id,
@@ -46,6 +47,7 @@ class StickerItem {
this.setId,
this.width,
this.height,
this.tags = const [],
});
bool get isAnimated => lottieUrl != null && lottieUrl!.isNotEmpty;
@@ -57,5 +59,16 @@ class StickerItem {
setId: map['setId'] as int?,
width: map['width'] as int?,
height: map['height'] as int?,
tags: _parseTags(map['tags']),
);
static List<String> _parseTags(dynamic raw) {
if (raw is! List) return const [];
final result = <String>[];
for (final e in raw) {
final s = e?.toString();
if (s != null && s.isNotEmpty) result.add(s);
}
return result;
}
}