feat: add characters

This commit is contained in:
2026-07-10 00:56:58 +03:30
parent 7c067d36f2
commit 97d156c492
28 changed files with 486 additions and 94 deletions
@@ -9,7 +9,9 @@ class LobbyPlayer {
final String avatar; // seed آواتارِ انتخابیِ کاربر
final bool host;
final int seat; // جایگاهِ مطلق (۰..۳)
const LobbyPlayer(this.name, this.avatar, this.host, this.seat);
final String avatarImg; // شخصیتِ آواتارِ انتخابی (<id>.<ext>؛ خالی ⇒ تصادفی)
const LobbyPlayer(this.name, this.avatar, this.host, this.seat,
{this.avatarImg = ''});
/// seedِ آواتار برای نمایش: آواتارِ انتخابی، وگرنه نام.
String get avatarSeed => avatar.isNotEmpty ? avatar : name;
@@ -42,6 +44,7 @@ class TableLobby {
(e['avatar'] ?? '') as String,
(e['host'] ?? false) as bool,
(e['seat'] ?? 0) as int,
avatarImg: (e['avatar_img'] ?? '') as String,
))
.toList(),
isHost: (j['host'] ?? false) as bool,