Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
environmental_dashboard_model.dart
Go to the documentation of this file.
1import '../../domain/entities/environmental_dashboard_entity.dart';
2
5 required super.balance,
6 required super.colorMetrics,
7 });
8
9 factory EnvironmentalDashboardModel.fromJson(Map<String, dynamic> json) {
11 balance: json['balance'],
12 colorMetrics: json['colorMetrics'] != null
13 ? ColorMetricsModel.fromJson(json['colorMetrics'])
14 : null,
15 );
16 }
17
18 Map<String, dynamic> toJson() {
19 return {
20 'balance': balance,
21 'colorMetrics': (colorMetrics as ColorMetricsModel?)?.toJson(),
22 };
23 }
24}
25
28 required super.blue,
29 required super.gray,
30 required super.green,
31 required super.orange,
32 });
33
34 factory ColorMetricsModel.fromJson(Map<String, dynamic> json) {
35 return ColorMetricsModel(
36 blue: json['blue'],
37 gray: json['gray'],
38 green: json['green'],
39 orange: json['orange'],
40 );
41 }
42
43 Map<String, dynamic> toJson() {
44 return {
45 'blue': blue,
46 'gray': gray,
47 'green': green,
48 'orange': orange,
49 };
50 }
51}
factory EnvironmentalDashboardModel fromJson(Map< String, dynamic > json)
EnvironmentalDashboardModel({ required super.balance, required super.colorMetrics, })
EnvironmentalDashboardEntity({ required this.balance, required this.colorMetrics, })
class EnvironmentalDashboardEntity blue
ColorMetricsEntity({ required this.blue, required this.gray, required this.green, required this.orange, })
class EnvironmentalDashboardModel extends EnvironmentalDashboardEntity ColorMetricsModel({ required super.blue, required super.gray, required super.green, required super.orange, })
Map< String, dynamic > toJson()