import 'player.dart'; import 'staff.dart'; class Convocation { final List available; final List staff; Convocation({required this.available, required this.staff}); factory Convocation.fromJson(Map json) => Convocation( available: (json['available'] as List? ?? []) .map((e) => Player.fromJson(e as Map)) .toList(), staff: (json['staff'] as List? ?? []) .map((e) => Staff.fromJson(e as Map)) .toList(), ); }