Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
food_waste_disposal_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 FoodWasteDisposalView extends StatelessWidget {
8 const FoodWasteDisposalView({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: 4,
43 ),
44 SizedBox(height: 10.sp),
45 Text(
46 'What Percentage Of Your Food Waste Is',
47 style: Theme.of(context).textTheme.displaySmall?.copyWith(
48 fontSize: 12.sp,
49 ),
50 ),
51 SizedBox(height: 20.sp),
52 _buildInputField(context, 'Landfilled:'),
53 SizedBox(height: 15.sp),
54 _buildInputField(context, 'Composted:'),
55 SizedBox(height: 15.sp),
56 _buildInputField(context, 'Donated:'),
57 ],
58 ),
59 ),
60 ],
61 ),
62 );
63 }
64
65 Widget _buildInputField(BuildContext context, String label) {
66 return Column(
67 crossAxisAlignment: CrossAxisAlignment.start,
68 children: [
69 Text(
70 label,
71 style: Theme.of(context).textTheme.bodySmall,
72 ),
73 SizedBox(height: 10.sp),
75 hintText: 'input',
76 fillColor: Theme.of(context).highlightColor.withOpacity(0.11),
77 suffix: Padding(
78 padding: EdgeInsets.only(top: 13.sp, right: 10.sp),
79 child: Text(
80 '%',
81 style: Theme.of(context).textTheme.bodySmall?.copyWith(
82 color: Theme.of(context).colorScheme.primary,
83 height: 0.0,
84 ),
85 ),
86 ),
87 controller: TextEditingController(),
88 ),
89 ],
90 );
91 }
92}
const FoodWasteDisposalView({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)