factory PlayerMessage.fromJson(Map<String, dynamic> json) { return PlayerMessage( level: PlayerMessageLevel.fromJson(json['level'] as String), message: json['message'] as String, ); }