mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Implemented an initial version of AqiDistributionChart
.
This commit is contained in:
31
lib/pages/analytics/models/air_quality_data_model.dart
Normal file
31
lib/pages/analytics/models/air_quality_data_model.dart
Normal file
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
class AirQualityDataModel {
|
||||
const AirQualityDataModel({
|
||||
required this.date,
|
||||
this.aqi,
|
||||
this.pm25,
|
||||
this.pm10,
|
||||
this.hcho,
|
||||
this.tvoc,
|
||||
this.co2,
|
||||
});
|
||||
|
||||
final DateTime date;
|
||||
final double? aqi;
|
||||
final double? pm25;
|
||||
final double? pm10;
|
||||
final double? hcho;
|
||||
final double? tvoc;
|
||||
final double? co2;
|
||||
|
||||
static const Map<String, Color> metricColors = {
|
||||
'aqi': ColorsManager.goodGreen,
|
||||
'pm25': ColorsManager.moderateYellow,
|
||||
'pm10': ColorsManager.poorOrange,
|
||||
'hcho': ColorsManager.unhealthyRed,
|
||||
'tvoc': ColorsManager.severePink,
|
||||
'co2': ColorsManager.hazardousPurple,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user