initial import
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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(),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user