Stickers hint

This commit is contained in:
2024-08-06 18:18:40 +08:00
parent 56bbf73b5e
commit c48bd3e758
6 changed files with 240 additions and 30 deletions

View File

@ -1,5 +1,7 @@
import 'package:get/get.dart';
import 'package:solian/models/account.dart';
import 'package:solian/models/attachment.dart';
import 'package:solian/services.dart';
class Sticker {
int id;
@ -30,6 +32,14 @@ class Sticker {
required this.account,
});
String get textPlaceholder => '${pack?.prefix}$alias'.camelCase!;
String get textWarpedPlaceholder => ':$textPlaceholder:';
String get imageUrl => ServiceFinder.buildUrl(
'files',
'/attachments/$attachmentId',
);
factory Sticker.fromJson(Map<String, dynamic> json) => Sticker(
id: json['id'],
createdAt: DateTime.parse(json['created_at']),