Customer.fromMap constructor

Customer.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Customer.fromMap(Map<String, dynamic> map) {
  return Customer(
    id: map['id'] ?? '',
    email: map['email'] ?? '',
    name: map['name'] ?? '',
    instruments: map['instruments'] != null
        ? List<Instrument>.from(
            map['instruments'].map((x) => Instrument.fromMap(x)))
        : [],
  );
}