Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
local_suppliers_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 LocalSuppliersView extends StatefulWidget {
9 const LocalSuppliersView({super.key});
10
11 @override
12 State<LocalSuppliersView> createState() => _LocalSuppliersViewState();
13}
14
15class _LocalSuppliersViewState extends State<LocalSuppliersView> {
16 final List<String> options = ['Yes', 'No'];
18
19 void _onSelect(String option) {
20 setState(() {
21 selectedOption = option;
22 });
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 'Transport',
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 Prioritize Local Suppliers (<100 Km) To Reduce Transport Emissions?',
62 style: Theme.of(context).textTheme.displaySmall?.copyWith(
63 fontSize: 12.sp,
64 ),
65 ),
66 SizedBox(height: 20.sp),
67 ...options.map((option) => Padding(
68 padding: const EdgeInsets.only(bottom: 10),
69 child: CustomOptionButton(
70 isSelected: selectedOption == option,
71 onPressed: () => _onSelect(option),
72 option: option,
73 ),
74 )),
75 ],
76 ),
77 ),
78 ],
79 ),
80 );
81 }
82}
const LocalSuppliersView({super.key})
override State< LocalSuppliersView > createState()
const CustomCard({ super.key, required this.child, this.padding, this.bgColor, })
final Widget child
final EdgeInsets padding
void _onSelect(String option)
final bool isSelected
class EnergySavingsMeasure extends StatefulWidget options
List< String > selectedOption
final Color color
Definition failures.dart:1
override Widget build(BuildContext context)