Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
action_buttons.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3
4import '../../../../core/UI/theme/color_palette.dart';
5
6class ActionButtons extends StatelessWidget {
7 final VoidCallback onAccept;
8 final VoidCallback onDecline;
9
11 super.key,
12 required this.onAccept,
13 required this.onDecline,
14 });
15
16 @override
17 Widget build(BuildContext context) {
18 return Container(
19 padding: EdgeInsets.all(16.sp),
20 decoration: BoxDecoration(
22 ),
23 child: SafeArea(
24 child: Row(
25 children: [
26 Expanded(
28 text: 'Decline',
29 icon: Icons.close,
30 color: Colors.red,
32 ),
33 ),
34 SizedBox(width: 12.w),
35 Expanded(
37 text: 'Accept',
38 icon: Icons.check,
41 ),
42 ),
43 ],
44 ),
45 ),
46 );
47 }
48
50 required String text,
51 required IconData icon,
52 required Color color,
53 required VoidCallback onPressed,
54 }) {
55 return Container(
56 height: 50.h,
57 decoration: BoxDecoration(
58 gradient: LinearGradient(
59 colors: [
60 color,
61 color.withValues(alpha: 0.8),
62 ],
63 ),
64 borderRadius: BorderRadius.circular(12.r),
65 boxShadow: [
66 BoxShadow(
67 color: color.withValues(alpha: 0.3),
68 blurRadius: 8,
69 offset: const Offset(0, 2),
70 ),
71 ],
72 ),
73 child: Material(
74 color: Colors.transparent,
75 child: InkWell(
76 borderRadius: BorderRadius.circular(12.r),
78 child: Row(
79 mainAxisAlignment: MainAxisAlignment.center,
80 children: [
81 Icon(
82 icon,
83 size: 18.sp,
84 color: Colors.white,
85 ),
86 SizedBox(width: 8.w),
87 Text(
88 text,
89 style: TextStyle(
90 fontSize: 14.sp,
91 fontWeight: FontWeight.w600,
92 color: Colors.white,
93 ),
94 ),
95 ],
96 ),
97 ),
98 ),
99 );
100 }
101}
static const lightGreen
static const antiFlashWhite
Widget _buildActionButton({ required String text, required IconData icon, required Color color, required VoidCallback onPressed, })
final VoidCallback onPressed
final String text
final VoidCallback onDecline
final Widget child
override Widget build(BuildContext context)
final VoidCallback onAccept
final EdgeInsets padding
const ActionButtons({ super.key, required this.onAccept, required this.onDecline, })
final Widget child
class Partner String
final Color color
Definition failures.dart:1
final VoidCallback onPressed
final VoidCallback onTap
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)
style SizedBox(height:2.h)