2024-05-19 15:22:06 +00:00
|
|
|
class CreateGameResponse {
|
2023-06-29 23:49:18 +00:00
|
|
|
final String? passphrase;
|
2023-06-02 21:28:40 +00:00
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
const CreateGameResponse({
|
2023-06-29 23:49:18 +00:00
|
|
|
required this.passphrase,
|
2023-06-02 21:28:40 +00:00
|
|
|
});
|
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
factory CreateGameResponse.empty() {
|
|
|
|
return const CreateGameResponse(passphrase: null);
|
2024-05-15 17:42:18 +00:00
|
|
|
}
|
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
factory CreateGameResponse.fromJson(Map<String, dynamic> json) {
|
2023-06-29 23:49:18 +00:00
|
|
|
final passphrase = json['passphrase'];
|
2023-06-02 21:28:40 +00:00
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
return CreateGameResponse(passphrase: passphrase);
|
2023-06-02 21:28:40 +00:00
|
|
|
}
|
2023-06-29 23:49:18 +00:00
|
|
|
|
2024-05-15 17:42:18 +00:00
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
return {
|
|
|
|
'passphrase': passphrase,
|
|
|
|
};
|
|
|
|
}
|
2023-06-02 21:28:40 +00:00
|
|
|
}
|