feat:add frames
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/// یک قابِ آواتار (کازمتیک). owned یعنی قابلِ انتخاب.
|
||||
class AvatarFrame {
|
||||
final String id;
|
||||
final String title;
|
||||
final int priceCoins;
|
||||
final bool vip;
|
||||
final bool owned;
|
||||
|
||||
const AvatarFrame({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.priceCoins,
|
||||
required this.vip,
|
||||
required this.owned,
|
||||
});
|
||||
|
||||
factory AvatarFrame.fromJson(Map<String, dynamic> j) => AvatarFrame(
|
||||
id: (j['id'] ?? '') as String,
|
||||
title: (j['title'] ?? '') as String,
|
||||
priceCoins: (j['price_coins'] ?? 0) as int,
|
||||
vip: (j['vip'] ?? false) as bool,
|
||||
owned: (j['owned'] ?? false) as bool,
|
||||
);
|
||||
}
|
||||
|
||||
/// کاتالوگِ قابها + قابِ انتخابیِ کاربر.
|
||||
class FrameCatalog {
|
||||
final List<AvatarFrame> frames;
|
||||
final String selected;
|
||||
const FrameCatalog({required this.frames, required this.selected});
|
||||
}
|
||||
Reference in New Issue
Block a user