feat: add characters
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user