Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
waste_percentage_view.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3import '../../../../../core/ui/widgets/custom_text_form_field.dart';
4import '../../widgets/step_brogress_bar.dart';
5import '/core/ui/widgets/custom_card.dart';
6
7class WastePercentageView extends StatelessWidget {
8 const WastePercentageView({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: 2,
43 ),
44 SizedBox(height: 10.sp),
45 Text(
46 'What Percentage Of Your Waste Is?',
47 style: Theme.of(context).textTheme.displaySmall?.copyWith(
48 fontSize: 12.sp,
49 ),
50 ),
51 SizedBox(height: 20.sp),
53 context,
54 'Food Waste (E.G., Preparation Scraps, Plate Leftovers, Unsold Products):',
55 ),
56 SizedBox(height: 15.sp),
58 context,
59 'Packaging Waste (E.G., Plastic, Paper, Glass):',
60 ),
61 SizedBox(height: 15.sp),
63 context,
64 'Other (E.G., Cleaning Materials, General Trash):',
65 ),
66 ],
67 ),
68 ),
69 ],
70 ),
71 );
72 }
73
74 Widget _buildInputField(BuildContext context, String label) {
75 return Column(
76 crossAxisAlignment: CrossAxisAlignment.start,
77 children: [
78 Text(
79 label,
80 style: Theme.of(context).textTheme.bodySmall,
81 ),
82 SizedBox(height: 10.sp),
84 hintText: 'input',
85 fillColor: Theme.of(context).highlightColor.withOpacity(0.11),
86 suffix: Padding(
87 padding: EdgeInsets.only(top: 13.sp, right: 10.sp),
88 child: Text(
89 '%',
90 style: Theme.of(context).textTheme.bodySmall?.copyWith(
91 color: Theme.of(context).colorScheme.primary,
92 height: 0.0,
93 ),
94 ),
95 ),
96 controller: TextEditingController(),
97 ),
98 ],
99 );
100 }
101}
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)
const WastePercentageView({super.key})