Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
Monthly_footprint_statistic.dart
Go to the documentation of this file.
1import 'dart:ui';
2
3import 'package:connect/core/localization/app_localizations.dart';
4import 'package:connect/core/ui/widgets/custom_card.dart';
5
6import '/core/ui/widgets/custom_scaffold.dart';
7import '/features/monthly_footprint/presentation/screens/widgets/co2_stats_chart.dart';
8import '/features/monthly_footprint/presentation/screens/widgets/emission_breakdown_list.dart';
9import '/features/monthly_footprint/presentation/screens/widgets/segmented_circular_progress.dart';
10import 'package:flutter/foundation.dart';
11import 'package:flutter/material.dart';
12import 'package:flutter_screenutil/flutter_screenutil.dart';
13
15 const MonthlyFootPrintStatsScreen({super.key});
16
17 @override
18 State<MonthlyFootPrintStatsScreen> createState() =>
19 _MonthlyFootPrintStatsScreenState();
20}
21
22class _MonthlyFootPrintStatsScreenState
23 extends State<MonthlyFootPrintStatsScreen> {
24 @override
25 Widget build(BuildContext context) {
26 return CustomScaffold(
27 isLeadingVisible: true,
28 title: AppLocalizations.of(context).translate('Footprint Statistics'),
29 body: Stack(
30 children: [
31 SingleChildScrollView(
32 physics: NeverScrollableScrollPhysics(),
33 padding: EdgeInsets.symmetric(
34 horizontal: 15.sp,
35 vertical: 10.sp,
36 ),
37 child: Column(
38 children: [
39 const Co2EmissionIndicator(value: 16246),
40 SizedBox(height: 15.sp),
41 Co2StatisticsChart(
42 data: [
43 Co2Data(month: 'Jan', value: 12000),
44 Co2Data(month: 'Feb', value: 8000),
45 Co2Data(month: 'Mar', value: 14000),
46 Co2Data(month: 'Apr', value: 6000),
47 Co2Data(month: 'Jun', value: 4000),
48 Co2Data(month: 'Jul', value: 10000),
49 Co2Data(month: 'Aug', value: 16000),
50 Co2Data(month: 'Sep', value: 16246),
51 ],
52 timeFrame: 'Yearly',
53 ),
54 SizedBox(height: 15.sp),
55 const EmissionsBreakdownList(),
56 ],
57 ),
58 ),
59 Positioned(
60 left: 0,
61 right: 0,
62 top: 280.sp,
63 bottom: 0,
64 child: ClipRect(
65 child: BackdropFilter(
66 filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
67 child: Container(
68 padding: EdgeInsets.symmetric(horizontal: 20.sp),
69 child: Center(
70 child: Text(
71 AppLocalizations.of(context)
72 .translate('This feature is not available'),
73 textAlign: TextAlign.center,
74 style: Theme.of(context).textTheme.displaySmall,
75 ),
76 ),
77 ),
78 ),
79 ),
80 ),
81 ],
82 ),
83 );
84 }
85}
const MonthlyFootPrintStatsScreen({super.key})
String translate(String key)
static AppLocalizations of(BuildContext context)
const MonthlyFootPrintStatsScreen({super.key})
override State< MonthlyFootPrintStatsScreen > createState()
final Widget child
final EdgeInsets padding
override Widget build(BuildContext context)
final double value
final String title