Product.fromMap constructor

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

Implementation

factory Product.fromMap(Map<String, dynamic> map) {
  return Product(
    int.parse(map['quantity']),
    map['name'] as String,
    map['description'] as String,
    double.parse(map['price']),
    double.parse(map['tax']),
  );
}