Newer
Older
final String firstName;
final String name;
final String promotion;
final String studentId;
Student({
required this.firstName,
required this.name,
required this.promotion,
required this.studentId
});
Map<String, dynamic> toMap() {
return {
'firstName': firstName,
'name': name,
'promotion': promotion,
'studentId': studentId
};
}
factory Student.fromMap(Map<String, dynamic> map) {
return Student(
firstName: map['firstName'],
name: map['name'],
promotion: map['promotion'],
studentId: map['studentId']
);
}
}