Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
confirm_location_button.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';
4
5import '../../../../../../core/ui/theme/color_palette.dart';
6
7class ConfirmLocationButton extends StatelessWidget {
8 final VoidCallback? onPressed;
9 final bool isLoading;
10
12 super.key,
13 required this.onPressed,
14 this.isLoading = false,
15 });
16
17 @override
18 Widget build(BuildContext context) {
19 return ElevatedButton(
21 style: ElevatedButton.styleFrom(
22 backgroundColor: ColorPalette.lightGreen,
23 foregroundColor: Colors.white,
24 padding: EdgeInsets.symmetric(vertical: 16.h),
25 shape: RoundedRectangleBorder(
26 borderRadius: BorderRadius.circular(12.r),
27 ),
28 elevation: 4,
29 shadowColor: Colors.black.withValues(alpha: 0.2),
30 ),
32 ? SizedBox(
33 height: 20.h,
34 width: 20.w,
35 child: CircularProgressIndicator(
36 color: Colors.white,
37 strokeWidth: 2,
38 ),
39 )
40 : Text(
41 'scheduling.confirm_location'.tr(),
42 style: TextStyle(
43 fontSize: 16.sp,
44 fontWeight: FontWeight.w600,
45 ),
46 ),
47 );
48 }
49}
static const lightGreen
final VoidCallback onPressed
final Widget child
override Widget build(BuildContext context)
final EdgeInsets padding
const ConfirmLocationButton({ super.key, required this.onPressed, this.isLoading=false, })
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)
style SizedBox(height:2.h)