MeasurementValueConfiguration.fromMap constructor

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

Implementation

factory MeasurementValueConfiguration.fromMap(Map<String, dynamic> map) {
  return MeasurementValueConfiguration(
    name: map['name'],
    scale: MeasurementScale.fromMap(map['scale']),
    precision: MeasurementPrecision.values
        .firstWhere((element) => element.name == map['precision']),
  );
}