Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
delivery_distance_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 DeliveryDistanceView extends StatefulWidget {
9 const DeliveryDistanceView({super.key});
10
11 @override
12 State<DeliveryDistanceView> createState() => _DeliveryDistanceViewState();
13}
14
15class _DeliveryDistanceViewState extends State<DeliveryDistanceView> {
16 final List<String> options = [
17 'Less than 20 km',
18 '20 km to 100 km',
19 'More than 100 km',
20 ];
22
23 void _onSelect(String option) {
24 setState(() {
25 selectedOption = option;
26 });
27 }
28
29 @override
30 Widget build(BuildContext context) {
31 return SingleChildScrollView(
32 padding: EdgeInsets.all(15.sp),
33 child: Column(
34 crossAxisAlignment: CrossAxisAlignment.start,
35 children: [
36 Container(
37 width: double.infinity,
38 padding: EdgeInsets.all(15.sp),
39 decoration: BoxDecoration(
40 color: Colors.blue.withOpacity(0.11),
41 borderRadius: BorderRadius.circular(10),
42 ),
43 child: Center(
44 child: Text(
45 'Transport',
46 style: Theme.of(context)
47 .textTheme
48 .bodySmall
49 ?.copyWith(color: Colors.blue),
50 ),
51 ),
52 ),
53 SizedBox(height: 10.sp),
55 padding: EdgeInsets.all(15.sp),
56 child: Column(
57 crossAxisAlignment: CrossAxisAlignment.start,
58 children: [
59 SimpleProgressBar(
60 totalSteps: 6,
61 currentStep: 2,
62 ),
63 SizedBox(height: 10.sp),
64 Text(
65 'What Is The Average Distance For Each Delivery?',
66 style: Theme.of(context).textTheme.displaySmall?.copyWith(
67 fontSize: 12.sp,
68 ),
69 ),
70 Text(
71 '(Select One)',
72 style: Theme.of(context).textTheme.displaySmall?.copyWith(
73 color: Theme.of(context).hintColor,
74 fontSize: 10.sp,
75 ),
76 ),
77 SizedBox(height: 20.sp),
78 ...options.map((option) => Padding(
79 padding: const EdgeInsets.only(bottom: 10),
80 child: CustomOptionButton(
81 isSelected: selectedOption == option,
82 onPressed: () => _onSelect(option),
83 option: option,
84 ),
85 )),
86 ],
87 ),
88 ),
89 ],
90 ),
91 );
92 }
93}
override State< DeliveryDistanceView > createState()
const DeliveryDistanceView({super.key})
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)