Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
collection_request_success_screen.dart
Go to the documentation of this file.
1import 'package:easy_localization/easy_localization.dart';
2import 'package:flutter/material.dart';
3import 'package:flutter_screenutil/flutter_screenutil.dart';
4import 'package:go_router/go_router.dart';
5import 'package:lottie/lottie.dart';
6
7import '../../../../../core/constants/assets.dart';
8import '../../../../../core/router/routes.dart';
9import '../../../../../core/services/location_service.dart';
10import '../../../../../core/ui/theme/color_palette.dart';
11import '../../../../../core/ui/widgets/custom_scaffold.dart';
12
13class CollectionRequestSuccessScreen extends StatelessWidget {
14
16 super.key,
17 });
18
19 @override
20 Widget build(BuildContext context) {
21 return CustomScaffold(
22 backgroundColor: ColorPalette.antiFlashWhite,
23 body: Column(
24 children: [
25 Expanded(
26 child: SingleChildScrollView(
27 child: Padding(
28 padding: EdgeInsets.all(24.sp),
30 children: [
31 SizedBox(height: 32.sp),
32 Row(
33 mainAxisAlignment: MainAxisAlignment.center,
34 children: [
35 Text(
36 'success_screen.collection_completed'.tr(),
37 style: TextStyle(
38 fontSize: 24.sp,
39 fontWeight: FontWeight.bold,
41 ),
42 ),
43 SizedBox(width: 10.sp),
44 Icon(
45 Icons.check_circle,
47 size: 32.sp,
48 ),
49 ],
50 ),
51 SizedBox(height: 8.sp),
52 Text(
53 'success_screen.collection_completed_message'.tr(),
54 style: TextStyle(
55 fontSize: 16.sp,
57 ),
58 textAlign: TextAlign.center,
59 ),
60 SizedBox(height: 100.sp),
61 Lottie.asset(
63 height: 200.sp,
64 width: 200.sp,
65 ),
66 ],
67 ),
68 ),
69 ),
70 ),
71 Padding(
72 padding: EdgeInsets.all(24.sp),
74 children: [
76 width: double.infinity,
77 child: ElevatedButton(
78 onPressed: () {
80 while (GoRouterState.of(context).fullPath != Routes.todayScheduleScreen.route) {
81 if (!GoRouter.of(context).canPop()) break;
82 GoRouter.of(context).pop();
83 }
84 },
85 style: ElevatedButton.styleFrom(
86 backgroundColor: ColorPalette.lightGreen,
87 padding: EdgeInsets.symmetric(vertical: 16.sp),
88 shape: RoundedRectangleBorder(
89 borderRadius: BorderRadius.circular(12.sp),
90 ),
91 ),
92 child: Text(
93 'success_screen.back_home'.tr(),
94 style: TextStyle(
95 fontSize: 16.sp,
96 fontWeight: FontWeight.w600,
97 ),
98 ),
99 ),
100 ),
101 ],
102 ),
103 ),
104 SizedBox(height: 24.sp),
105 ],
106 ),
107 );
108 }
109}
static const String successLottie
Definition assets.dart:22
static const lightGreen
static const antiFlashWhite
static const grey
void updateDeliveryContext({int? poId, String? poStatus})
final VoidCallback onPressed
final Widget child
override Widget build(BuildContext context)
final EdgeInsets padding
const CollectionRequestSuccessScreen({ super.key, })
Routes
Definition routes.dart:30
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)
style SizedBox(height:2.h)
style Column(crossAxisAlignment:CrossAxisAlignment.end, children:[Container(padding:EdgeInsets.symmetric(horizontal:8.w, vertical:4.h), decoration:BoxDecoration(color:ColorPalette.tiffanyBlue.withValues(alpha:0.1), borderRadius:BorderRadius.circular(12),), child:Text(collection.type ?? '', style:Theme.of(context).textTheme.bodySmall?.copyWith(color:ColorPalette.tiffanyBlue, fontWeight:FontWeight.bold,),),),],)