SensorMetadata.fromJson constructor

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

Implementation

factory SensorMetadata.fromJson(Map<String, dynamic> json) {
  return SensorMetadata(
    available:
        json.containsKey('available') ? json['available'] as bool : null,
    minimumFrequency: json.containsKey('minimumFrequency')
        ? json['minimumFrequency'] as num
        : null,
    maximumFrequency: json.containsKey('maximumFrequency')
        ? json['maximumFrequency'] as num
        : null,
  );
}