24 lines
484 B
Dart
24 lines
484 B
Dart
class CreateGameResponse {
|
|
final String? passphrase;
|
|
|
|
const CreateGameResponse({
|
|
required this.passphrase,
|
|
});
|
|
|
|
factory CreateGameResponse.empty() {
|
|
return const CreateGameResponse(passphrase: null);
|
|
}
|
|
|
|
factory CreateGameResponse.fromJson(Map<String, dynamic> json) {
|
|
final passphrase = json['passphrase'];
|
|
|
|
return CreateGameResponse(passphrase: passphrase);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'passphrase': passphrase,
|
|
};
|
|
}
|
|
}
|