19 lines
526 B
Dart
19 lines
526 B
Dart
import 'player.dart';
|
|
import 'staff.dart';
|
|
|
|
class Convocation {
|
|
final List<Player> available;
|
|
final List<Staff> staff;
|
|
|
|
Convocation({required this.available, required this.staff});
|
|
|
|
factory Convocation.fromJson(Map<String, dynamic> json) => Convocation(
|
|
available: (json['available'] as List? ?? [])
|
|
.map((e) => Player.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
staff: (json['staff'] as List? ?? [])
|
|
.map((e) => Staff.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
}
|