UnitOfMeasuresDto.fromJson constructor

UnitOfMeasuresDto.fromJson(
  1. Map<String, dynamic> json
)

Creates a new instance from a JSON map.

Implementation

factory UnitOfMeasuresDto.fromJson(Map<String, dynamic> json) {
  return UnitOfMeasuresDto(
    unit: json['unit'] as String,
    numerator: (json['numerator'] as num).toDouble(),
    denominator: (json['denominator'] as num).toDouble(),
  );
}