diff --git a/mobile-v3/lib/src/app/dashboard/widgets/analytics_forecast_widget.dart b/mobile-v3/lib/src/app/dashboard/widgets/analytics_forecast_widget.dart index d674919f9e..b7f28528d5 100644 --- a/mobile-v3/lib/src/app/dashboard/widgets/analytics_forecast_widget.dart +++ b/mobile-v3/lib/src/app/dashboard/widgets/analytics_forecast_widget.dart @@ -1,103 +1,103 @@ -import 'package:airqo/src/app/dashboard/bloc/forecast/forecast_bloc.dart'; -import 'package:airqo/src/app/shared/widgets/loading_widget.dart'; -import 'package:airqo/src/meta/utils/colors.dart'; -import 'package:airqo/src/meta/utils/utils.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:intl/intl.dart'; +// import 'package:airqo/src/app/dashboard/bloc/forecast/forecast_bloc.dart'; +// import 'package:airqo/src/app/shared/widgets/loading_widget.dart'; +// import 'package:airqo/src/meta/utils/colors.dart'; +// import 'package:airqo/src/meta/utils/utils.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_bloc/flutter_bloc.dart'; +// import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:intl/intl.dart'; -class AnalyticsForecastWidget extends StatefulWidget { - final String siteId; - const AnalyticsForecastWidget({super.key, required this.siteId}); +// class AnalyticsForecastWidget extends StatefulWidget { +// final String siteId; +// const AnalyticsForecastWidget({super.key, required this.siteId}); - @override - State createState() => - _AnalyticsForecastWidgetState(); -} +// @override +// State createState() => +// _AnalyticsForecastWidgetState(); +// } -class _AnalyticsForecastWidgetState extends State { - ForecastBloc? forecastBloc; +// class _AnalyticsForecastWidgetState extends State { +// ForecastBloc? forecastBloc; - @override - void initState() { - forecastBloc = context.read() - ..add(LoadForecast(widget.siteId)); - super.initState(); - } +// @override +// void initState() { +// forecastBloc = context.read() +// ..add(LoadForecast(widget.siteId)); +// super.initState(); +// } - @override - Widget build(BuildContext context) { - return BlocBuilder( - builder: (context, state) { - if (state is ForecastLoaded) { - return Row( - children: state.response.forecasts - .map((e) => ForeCastChip( - active: false, - date: DateFormat.d().format(e.time), - day: DateFormat.E().format(e.time)[0], - imagePath: getAirQualityIcon(e.measurement, e.pm25), - )) - .toList()); - } else if (state is ForecastLoading) { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: List.generate(7, (index) { - return ShimmerContainer( - height: 47 + 45, borderRadius: 22, width: 40); - })); - } +// @override +// Widget build(BuildContext context) { +// return BlocBuilder( +// builder: (context, state) { +// if (state is ForecastLoaded) { +// return Row( +// children: state.response.forecasts +// .map((e) => ForeCastChip( +// active: false, +// date: DateFormat.d().format(e.time), +// day: DateFormat.E().format(e.time)[0], +// imagePath: getAirQualityIcon(e.measurement, e.pm25), +// )) +// .toList()); +// } else if (state is ForecastLoading) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceAround, +// children: List.generate(7, (index) { +// return ShimmerContainer( +// height: 47 + 45, borderRadius: 22, width: 40); +// })); +// } - return Container( - child: Center( - child: Text(state.toString()), - ), - ); - }, - ); - } -} +// return Container( +// child: Center( +// child: Text(state.toString()), +// ), +// ); +// }, +// ); +// } +// } -class ForeCastChip extends StatelessWidget { - final bool active; - final String day; - final String imagePath; - final String date; - const ForeCastChip( - {super.key, - required this.active, - required this.imagePath, - required this.date, - required this.day}); +// class ForeCastChip extends StatelessWidget { +// final bool active; +// final String day; +// final String imagePath; +// final String date; +// const ForeCastChip( +// {super.key, +// required this.active, +// required this.imagePath, +// required this.date, +// required this.day}); - @override - Widget build(BuildContext context) { - return Expanded( - child: Container( - decoration: BoxDecoration( - color: active - ? AppColors.primaryColor - : Theme.of(context).highlightColor, - borderRadius: BorderRadius.circular(22)), - padding: const EdgeInsets.symmetric(vertical: 8), - margin: const EdgeInsets.symmetric(horizontal: 5), - height: 47 + 45, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(day), - Text(date), - SizedBox( - child: Center( - child: SvgPicture.asset( - imagePath, - height: 26, - width: 26, - ), - ), - ), - ])), - ); - } -} +// @override +// Widget build(BuildContext context) { +// return Expanded( +// child: Container( +// decoration: BoxDecoration( +// color: active +// ? AppColors.primaryColor +// : Theme.of(context).highlightColor, +// borderRadius: BorderRadius.circular(22)), +// padding: const EdgeInsets.symmetric(vertical: 8), +// margin: const EdgeInsets.symmetric(horizontal: 5), +// height: 47 + 45, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text(day), +// Text(date), +// SizedBox( +// child: Center( +// child: SvgPicture.asset( +// imagePath, +// height: 26, +// width: 26, +// ), +// ), +// ), +// ])), +// ); +// } +// } diff --git a/mobile-v3/lib/src/app/dashboard/widgets/analytics_specifics.dart b/mobile-v3/lib/src/app/dashboard/widgets/analytics_specifics.dart index e2c8171b0d..69090964a3 100644 --- a/mobile-v3/lib/src/app/dashboard/widgets/analytics_specifics.dart +++ b/mobile-v3/lib/src/app/dashboard/widgets/analytics_specifics.dart @@ -104,44 +104,44 @@ class _AnalyticsSpecificsState extends State { ], ), SizedBox(height: 16), - AnalyticsForecastWidget( - siteId: widget.measurement.siteDetails!.id!, - ), + // AnalyticsForecastWidget( + // siteId: widget.measurement.siteDetails!.id!, + // ), SizedBox(height: 16), ], ), ), AnalyticsCard(widget.measurement), - Container( - padding: const EdgeInsets.symmetric(horizontal: 16), - height: 41, - color: Theme.of(context).highlightColor, - child: Row( - children: [ - SizedBox( - child: Row( - children: [ - SvgPicture.asset("assets/icons/share-icon.svg"), - SizedBox(width: 6), - Text("Share"), - ], - ), - ), - SizedBox(width: 24), - SizedBox( - child: Row( - children: [ - SvgPicture.asset("assets/icons/save-icon.svg"), - SizedBox(width: 6), - Text("Save"), - ], - ), - ), - Spacer(), - Icon(Icons.more_vert) - ], - ), - ), + // Container( + // padding: const EdgeInsets.symmetric(horizontal: 16), + // height: 41, + // color: Theme.of(context).highlightColor, + // child: Row( + // children: [ + // SizedBox( + // child: Row( + // children: [ + // SvgPicture.asset("assets/icons/share-icon.svg"), + // SizedBox(width: 6), + // Text("Share"), + // ], + // ), + // ), + // SizedBox(width: 24), + // SizedBox( + // child: Row( + // children: [ + // SvgPicture.asset("assets/icons/save-icon.svg"), + // SizedBox(width: 6), + // Text("Save"), + // ], + // ), + // ), + // Spacer(), + // Icon(Icons.more_vert) + // ], + // ), + // ), // SizedBox(height: 8 + 4), // InkWell( // onTap: () => toggleContainer(),