mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
32 lines
913 B
Dart
32 lines
913 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
|
|
class AirQualityDataModel {
|
|
const AirQualityDataModel({
|
|
required this.date,
|
|
this.good,
|
|
this.moderate,
|
|
this.poor,
|
|
this.unhealthy,
|
|
this.severe,
|
|
this.hazardous,
|
|
});
|
|
|
|
final DateTime date;
|
|
final double? good;
|
|
final double? moderate;
|
|
final double? poor;
|
|
final double? unhealthy;
|
|
final double? severe;
|
|
final double? hazardous;
|
|
|
|
static final Map<String, Color> metricColors = {
|
|
'good': ColorsManager.goodGreen.withValues(alpha: 0.7),
|
|
'moderate': ColorsManager.moderateYellow.withValues(alpha: 0.7),
|
|
'poor': ColorsManager.poorOrange.withValues(alpha: 0.7),
|
|
'unhealthy': ColorsManager.unhealthyRed.withValues(alpha: 0.7),
|
|
'severe': ColorsManager.severePink.withValues(alpha: 0.7),
|
|
'hazardous': ColorsManager.hazardousPurple.withValues(alpha: 0.7),
|
|
};
|
|
}
|