Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
water_recycling_view.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3
4import '../../../../../core/ui/widgets/custom_card.dart';
5import '../../operational_details_screen/views/operational_hours_view.dart';
6import '../../widgets/step_brogress_bar.dart';
7
8class WaterRecyclingView extends StatefulWidget {
9 const WaterRecyclingView({super.key});
10
11 @override
12 State<WaterRecyclingView> createState() => _WaterRecyclingViewState();
13}
14
15class _WaterRecyclingViewState extends State<WaterRecyclingView> {
16 bool recyclingEnabled = false;
17 String selectedPercentage = '';
18 final List<String> percentages = [
19 '<10%',
20 '10-25%',
21 '25-50%',
22 '>50%',
23 ];
24
25 @override
26 Widget build(BuildContext context) {
27 return SingleChildScrollView(
28 padding: EdgeInsets.all(15.sp),
29 child: Column(
30 crossAxisAlignment: CrossAxisAlignment.start,
31 children: [
32 Container(
33 width: double.infinity,
34 padding: EdgeInsets.all(15.sp),
35 decoration: BoxDecoration(
36 color: Colors.blue.withOpacity(0.11),
37 borderRadius: BorderRadius.circular(10),
38 ),
39 child: Center(
40 child: Text(
41 'Water',
42 style: Theme.of(context)
43 .textTheme
44 .bodySmall
45 ?.copyWith(color: Colors.blue),
46 ),
47 ),
48 ),
49 SizedBox(height: 10.sp),
51 padding: EdgeInsets.all(15.sp),
52 child: Column(
53 crossAxisAlignment: CrossAxisAlignment.start,
54 children: [
55 SimpleProgressBar(
56 totalSteps: 6,
57 currentStep: 4,
58 ),
59 SizedBox(height: 10.sp),
60 Text(
61 'Do You Reuse Or Recycle Any Water In Your Operations?',
62 style: Theme.of(context).textTheme.displaySmall?.copyWith(
63 fontSize: 12.sp,
64 ),
65 ),
66 SizedBox(height: 20.sp),
67 CustomOptionButton(
69 onPressed: () =>
70 setState(() => recyclingEnabled = !recyclingEnabled),
71 option: 'Yes',
72 ),
73 CustomOptionButton(
75 onPressed: () =>
76 setState(() => recyclingEnabled = !recyclingEnabled),
77 option: 'No',
78 ),
79 if (recyclingEnabled) ...[
80 SizedBox(height: 20.sp),
81 Text(
82 'What Percentage Of Your Total Water Consumption Is Reused Or Recycled?',
83 style: Theme.of(context).textTheme.displaySmall?.copyWith(
84 fontSize: 12.sp,
85 ),
86 ),
87 SizedBox(height: 10.sp),
88 ...percentages.map((percentage) => Padding(
89 padding: const EdgeInsets.only(bottom: 10),
90 child: CustomOptionButton(
92 onPressed: () =>
93 setState(() => selectedPercentage = percentage),
94 option: percentage,
95 ),
96 )),
97 ],
98 ],
99 ),
100 ),
101 ],
102 ),
103 );
104 }
105}
override State< WaterRecyclingView > createState()
const WaterRecyclingView({super.key})
const CustomCard({ super.key, required this.child, this.padding, this.bgColor, })
final Widget child
final EdgeInsets padding
final double percentage
final bool isSelected
final Color color
Definition failures.dart:1
override Widget build(BuildContext context)
String selectedPercentage
final List< String > percentages
class WaterRecyclingView extends StatefulWidget recyclingEnabled