Scale.fromJson constructor

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

Implementation

factory Scale.fromJson(Map<String, dynamic> json) {
  return Scale(
    unit: (json['unit'] as String?)?.toScaleUnit(),
    value: json['value'] as double?,
  );
}