class SensorData { final double temperature; final double humidity; final double dewPoint; final int timestamp; SensorData({ required this.temperature, required this.humidity, required this.dewPoint, required this.timestamp, }); factory SensorData.fromJson(Map json) { return SensorData( temperature: json['temperature'], humidity: json['humidity'], dewPoint: json['dewPoint'], timestamp: json['timestamp'], ); } }