Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
packaging_waste_view.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3import '../../widgets/step_brogress_bar.dart';
4import '/core/ui/widgets/custom_card.dart';
5import '/core/ui/widgets/custom_text_form_field.dart';
6
7class PackagingWasteView extends StatelessWidget {
8 const PackagingWasteView({super.key});
9
10 @override
11 Widget build(BuildContext context) {
12 return SingleChildScrollView(
13 padding: EdgeInsets.all(15.sp),
14 child: Column(
15 crossAxisAlignment: CrossAxisAlignment.start,
16 children: [
17 Container(
18 width: double.infinity,
19 padding: EdgeInsets.all(15.sp),
20 decoration: BoxDecoration(
21 color: Colors.orange.withOpacity(0.11),
22 borderRadius: BorderRadius.circular(10),
23 ),
24 child: Center(
25 child: Text(
26 'Waste',
27 style: Theme.of(context)
28 .textTheme
29 .bodySmall
30 ?.copyWith(color: Colors.orange),
31 ),
32 ),
33 ),
34 SizedBox(height: 10.sp),
36 padding: EdgeInsets.all(15.sp),
37 child: Column(
38 crossAxisAlignment: CrossAxisAlignment.start,
39 children: [
40 SimpleProgressBar(
41 totalSteps: 9,
42 currentStep: 5,
43 ),
44 SizedBox(height: 10.sp),
45 Text(
46 'How Much Packaging Waste Do You Generate Monthly (In Kg)?',
47 style: Theme.of(context).textTheme.displaySmall?.copyWith(
48 fontSize: 12.sp,
49 ),
50 ),
51 SizedBox(height: 20.sp),
52 _buildInputField(context, 'Plastic:', 'kg'),
53 SizedBox(height: 15.sp),
54 _buildInputField(context, 'Paper/Cardboard:', 'kg'),
55 SizedBox(height: 15.sp),
56 _buildInputField(context, 'Glass:', 'kg'),
57 SizedBox(height: 15.sp),
58 _buildInputField(context, 'Metal (E.G., Cans, Foil):', 'kg'),
59 SizedBox(height: 20.sp),
60 Text(
61 'What Percentage Of Your Packaging Waste Is Recycled?',
62 style: Theme.of(context).textTheme.displaySmall?.copyWith(
63 fontSize: 12.sp,
64 ),
65 ),
66 SizedBox(height: 10.sp),
68 hintText: 'input',
69 fillColor: Theme.of(context).highlightColor.withOpacity(0.11),
70 suffix: Padding(
71 padding: EdgeInsets.only(top: 13.sp, right: 10.sp),
72 child: Text(
73 '%',
74 style: Theme.of(context).textTheme.bodySmall?.copyWith(
75 color: Theme.of(context).colorScheme.primary,
76 height: 0.0,
77 ),
78 ),
79 ),
80 controller: TextEditingController(),
81 ),
82 ],
83 ),
84 ),
85 ],
86 ),
87 );
88 }
89
90 Widget _buildInputField(BuildContext context, String label, String suffix) {
91 return Column(
92 crossAxisAlignment: CrossAxisAlignment.start,
93 children: [
94 Text(
95 label,
96 style: Theme.of(context).textTheme.bodySmall,
97 ),
98 SizedBox(height: 10.sp),
100 hintText: 'input',
101 fillColor: Theme.of(context).highlightColor.withOpacity(0.11),
102 suffix: Padding(
103 padding: EdgeInsets.only(top: 13.sp, right: 10.sp),
104 child: Text(
105 suffix,
106 style: Theme.of(context).textTheme.bodySmall?.copyWith(
107 color: Theme.of(context).colorScheme.primary,
108 height: 0.0,
109 ),
110 ),
111 ),
112 controller: TextEditingController(),
113 ),
114 ],
115 );
116 }
117}
const PackagingWasteView({super.key})
const CustomCard({ super.key, required this.child, this.padding, this.bgColor, })
final TextEditingController controller
final Widget child
override Widget build(BuildContext context)
const CustomTextFormField({ super.key, required this.hintText, required this.controller, this.suffix, this.focusNode, this.validator, this.isObscure=false, this.inputType, this.maxLines=1, this.padding, this.fillColor, this.labelText, this.inputFormatters, this.onChanged, })
final String label
Widget _buildInputField(BuildContext context, String label, String suffix)
Widget _buildInputField(BuildContext context, String label)