style: ui for record table

This commit is contained in:
2026-07-05 20:05:25 +03:30
parent df5cc699b6
commit 3e7e069487
2 changed files with 157 additions and 0 deletions
@@ -7,6 +7,7 @@ class TableTier {
final int prize;
final int xp;
final int trophy;
final int rankReward; // > 0 ⇒ میزِ رتبه‌بندی (به برنده امتیازِ رتبه می‌دهد)
const TableTier({
required this.id,
@@ -16,8 +17,12 @@ class TableTier {
required this.prize,
required this.xp,
required this.trophy,
this.rankReward = 0,
});
/// آیا این میزِ رتبه‌بندی است؟ (برد امتیازِ رتبه می‌دهد و در جدولِ قهرمانان بالا می‌برد)
bool get isRanked => rankReward > 0;
factory TableTier.fromJson(Map<String, dynamic> j) => TableTier(
id: j['id'] as String,
title: j['title'] as String,
@@ -26,6 +31,7 @@ class TableTier {
prize: (j['prize'] ?? 0) as int,
xp: (j['xp'] ?? 0) as int,
trophy: (j['trophy'] ?? 0) as int,
rankReward: (j['rank_reward'] ?? 0) as int,
);
}