Customer.fromMap constructor

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

Implementation

factory Customer.fromMap(Map<String, dynamic> map) {
  return Customer(
    id: map['id'] as int,
    name: map['name'] as String,
    age: map['age'] as int,
    phone: map['phone'] as String,
  );
}