Distance.fromMap constructor
Distance.fromMap(
- Map map
Implementation
factory Distance.fromMap(Map<dynamic, dynamic> map) {
return Distance(
actual_distance: map['actual_distance'] as int,
calculated_distance: map['calculated_distance'] as double,
duration: map['duration'] as String,
deliveryCost:
DeliveryCost.fromMap(map['delivery_cost'] as Map<dynamic, dynamic>),
total_delivery_cost: map['total_delivery_cost'] as int,
);
}