toMap method
Implementation
Map<String, dynamic> toMap() {
if (id!.isNotEmpty) {
return {
'id': id,
'email': email,
'name': name,
'instruments': instruments.map((x) => x.toMap()).toList(),
};
} else {
return {
'email': email,
'name': name,
};
}
}