Skip to content

Commit bc2e8ee

Browse files
authored
Merge pull request #2363 from airqo-platform/staging
move to production
2 parents d3f3fe6 + 4aea99a commit bc2e8ee

File tree

2 files changed

+128
-128
lines changed

2 files changed

+128
-128
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
1-
import 'package:airqo/src/app/dashboard/bloc/forecast/forecast_bloc.dart';
2-
import 'package:airqo/src/app/shared/widgets/loading_widget.dart';
3-
import 'package:airqo/src/meta/utils/colors.dart';
4-
import 'package:airqo/src/meta/utils/utils.dart';
5-
import 'package:flutter/material.dart';
6-
import 'package:flutter_bloc/flutter_bloc.dart';
7-
import 'package:flutter_svg/flutter_svg.dart';
8-
import 'package:intl/intl.dart';
1+
// import 'package:airqo/src/app/dashboard/bloc/forecast/forecast_bloc.dart';
2+
// import 'package:airqo/src/app/shared/widgets/loading_widget.dart';
3+
// import 'package:airqo/src/meta/utils/colors.dart';
4+
// import 'package:airqo/src/meta/utils/utils.dart';
5+
// import 'package:flutter/material.dart';
6+
// import 'package:flutter_bloc/flutter_bloc.dart';
7+
// import 'package:flutter_svg/flutter_svg.dart';
8+
// import 'package:intl/intl.dart';
99

10-
class AnalyticsForecastWidget extends StatefulWidget {
11-
final String siteId;
12-
const AnalyticsForecastWidget({super.key, required this.siteId});
10+
// class AnalyticsForecastWidget extends StatefulWidget {
11+
// final String siteId;
12+
// const AnalyticsForecastWidget({super.key, required this.siteId});
1313

14-
@override
15-
State<AnalyticsForecastWidget> createState() =>
16-
_AnalyticsForecastWidgetState();
17-
}
14+
// @override
15+
// State<AnalyticsForecastWidget> createState() =>
16+
// _AnalyticsForecastWidgetState();
17+
// }
1818

19-
class _AnalyticsForecastWidgetState extends State<AnalyticsForecastWidget> {
20-
ForecastBloc? forecastBloc;
19+
// class _AnalyticsForecastWidgetState extends State<AnalyticsForecastWidget> {
20+
// ForecastBloc? forecastBloc;
2121

22-
@override
23-
void initState() {
24-
forecastBloc = context.read<ForecastBloc>()
25-
..add(LoadForecast(widget.siteId));
26-
super.initState();
27-
}
22+
// @override
23+
// void initState() {
24+
// forecastBloc = context.read<ForecastBloc>()
25+
// ..add(LoadForecast(widget.siteId));
26+
// super.initState();
27+
// }
2828

29-
@override
30-
Widget build(BuildContext context) {
31-
return BlocBuilder<ForecastBloc, ForecastState>(
32-
builder: (context, state) {
33-
if (state is ForecastLoaded) {
34-
return Row(
35-
children: state.response.forecasts
36-
.map((e) => ForeCastChip(
37-
active: false,
38-
date: DateFormat.d().format(e.time),
39-
day: DateFormat.E().format(e.time)[0],
40-
imagePath: getAirQualityIcon(e.measurement, e.pm25),
41-
))
42-
.toList());
43-
} else if (state is ForecastLoading) {
44-
return Row(
45-
mainAxisAlignment: MainAxisAlignment.spaceAround,
46-
children: List.generate(7, (index) {
47-
return ShimmerContainer(
48-
height: 47 + 45, borderRadius: 22, width: 40);
49-
}));
50-
}
29+
// @override
30+
// Widget build(BuildContext context) {
31+
// return BlocBuilder<ForecastBloc, ForecastState>(
32+
// builder: (context, state) {
33+
// if (state is ForecastLoaded) {
34+
// return Row(
35+
// children: state.response.forecasts
36+
// .map((e) => ForeCastChip(
37+
// active: false,
38+
// date: DateFormat.d().format(e.time),
39+
// day: DateFormat.E().format(e.time)[0],
40+
// imagePath: getAirQualityIcon(e.measurement, e.pm25),
41+
// ))
42+
// .toList());
43+
// } else if (state is ForecastLoading) {
44+
// return Row(
45+
// mainAxisAlignment: MainAxisAlignment.spaceAround,
46+
// children: List.generate(7, (index) {
47+
// return ShimmerContainer(
48+
// height: 47 + 45, borderRadius: 22, width: 40);
49+
// }));
50+
// }
5151

52-
return Container(
53-
child: Center(
54-
child: Text(state.toString()),
55-
),
56-
);
57-
},
58-
);
59-
}
60-
}
52+
// return Container(
53+
// child: Center(
54+
// child: Text(state.toString()),
55+
// ),
56+
// );
57+
// },
58+
// );
59+
// }
60+
// }
6161

62-
class ForeCastChip extends StatelessWidget {
63-
final bool active;
64-
final String day;
65-
final String imagePath;
66-
final String date;
67-
const ForeCastChip(
68-
{super.key,
69-
required this.active,
70-
required this.imagePath,
71-
required this.date,
72-
required this.day});
62+
// class ForeCastChip extends StatelessWidget {
63+
// final bool active;
64+
// final String day;
65+
// final String imagePath;
66+
// final String date;
67+
// const ForeCastChip(
68+
// {super.key,
69+
// required this.active,
70+
// required this.imagePath,
71+
// required this.date,
72+
// required this.day});
7373

74-
@override
75-
Widget build(BuildContext context) {
76-
return Expanded(
77-
child: Container(
78-
decoration: BoxDecoration(
79-
color: active
80-
? AppColors.primaryColor
81-
: Theme.of(context).highlightColor,
82-
borderRadius: BorderRadius.circular(22)),
83-
padding: const EdgeInsets.symmetric(vertical: 8),
84-
margin: const EdgeInsets.symmetric(horizontal: 5),
85-
height: 47 + 45,
86-
child: Column(
87-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
88-
children: [
89-
Text(day),
90-
Text(date),
91-
SizedBox(
92-
child: Center(
93-
child: SvgPicture.asset(
94-
imagePath,
95-
height: 26,
96-
width: 26,
97-
),
98-
),
99-
),
100-
])),
101-
);
102-
}
103-
}
74+
// @override
75+
// Widget build(BuildContext context) {
76+
// return Expanded(
77+
// child: Container(
78+
// decoration: BoxDecoration(
79+
// color: active
80+
// ? AppColors.primaryColor
81+
// : Theme.of(context).highlightColor,
82+
// borderRadius: BorderRadius.circular(22)),
83+
// padding: const EdgeInsets.symmetric(vertical: 8),
84+
// margin: const EdgeInsets.symmetric(horizontal: 5),
85+
// height: 47 + 45,
86+
// child: Column(
87+
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
88+
// children: [
89+
// Text(day),
90+
// Text(date),
91+
// SizedBox(
92+
// child: Center(
93+
// child: SvgPicture.asset(
94+
// imagePath,
95+
// height: 26,
96+
// width: 26,
97+
// ),
98+
// ),
99+
// ),
100+
// ])),
101+
// );
102+
// }
103+
// }

mobile-v3/lib/src/app/dashboard/widgets/analytics_specifics.dart

+33-33
Original file line numberDiff line numberDiff line change
@@ -104,44 +104,44 @@ class _AnalyticsSpecificsState extends State<AnalyticsSpecifics> {
104104
],
105105
),
106106
SizedBox(height: 16),
107-
AnalyticsForecastWidget(
108-
siteId: widget.measurement.siteDetails!.id!,
109-
),
107+
// AnalyticsForecastWidget(
108+
// siteId: widget.measurement.siteDetails!.id!,
109+
// ),
110110
SizedBox(height: 16),
111111
],
112112
),
113113
),
114114
AnalyticsCard(widget.measurement),
115-
Container(
116-
padding: const EdgeInsets.symmetric(horizontal: 16),
117-
height: 41,
118-
color: Theme.of(context).highlightColor,
119-
child: Row(
120-
children: [
121-
SizedBox(
122-
child: Row(
123-
children: [
124-
SvgPicture.asset("assets/icons/share-icon.svg"),
125-
SizedBox(width: 6),
126-
Text("Share"),
127-
],
128-
),
129-
),
130-
SizedBox(width: 24),
131-
SizedBox(
132-
child: Row(
133-
children: [
134-
SvgPicture.asset("assets/icons/save-icon.svg"),
135-
SizedBox(width: 6),
136-
Text("Save"),
137-
],
138-
),
139-
),
140-
Spacer(),
141-
Icon(Icons.more_vert)
142-
],
143-
),
144-
),
115+
// Container(
116+
// padding: const EdgeInsets.symmetric(horizontal: 16),
117+
// height: 41,
118+
// color: Theme.of(context).highlightColor,
119+
// child: Row(
120+
// children: [
121+
// SizedBox(
122+
// child: Row(
123+
// children: [
124+
// SvgPicture.asset("assets/icons/share-icon.svg"),
125+
// SizedBox(width: 6),
126+
// Text("Share"),
127+
// ],
128+
// ),
129+
// ),
130+
// SizedBox(width: 24),
131+
// SizedBox(
132+
// child: Row(
133+
// children: [
134+
// SvgPicture.asset("assets/icons/save-icon.svg"),
135+
// SizedBox(width: 6),
136+
// Text("Save"),
137+
// ],
138+
// ),
139+
// ),
140+
// Spacer(),
141+
// Icon(Icons.more_vert)
142+
// ],
143+
// ),
144+
// ),
145145
// SizedBox(height: 8 + 4),
146146
// InkWell(
147147
// onTap: () => toggleContainer(),

0 commit comments

Comments
 (0)