Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
action_buttons.dart
Go to the documentation of this file.
1import 'package:flutter_screenutil/flutter_screenutil.dart';
2
3import '/core/router/routes.dart';
4import 'package:flutter/material.dart';
5import 'package:go_router/go_router.dart';
6import 'package:hugeicons/hugeicons.dart';
7
8import 'dashboard_card.dart';
9
10class ActionButtons extends StatelessWidget {
11 const ActionButtons({super.key});
12
13 @override
14 Widget build(BuildContext context) {
15 return Row(
16 mainAxisAlignment: MainAxisAlignment.spaceBetween,
17 children: [
18 SizedBox(),
20 icon: HugeIcons.strokeRoundedNotification01,
21 context: context,
22 onPressed: () {
23 context.push(Routes.notifications.route);
24 },
25 ),
26 // _buildActionButton(
27 // icon: HugeIcons.strokeRoundedCustomerService01,
28 // context: context,
29 // onPressed: () {},
30 // ),
31 ],
32 );
33 }
34
36 required IconData icon,
37 required Function() onPressed,
38 required BuildContext context,
39 }) {
40 return Stack(
41 alignment: Alignment.center,
42 children: [
43 CustomPaint(
44 size: Size(50.sp, 50.sp),
45 painter: CircularProgressPainter(
46 progress: 0.90,
47 progressColor: Theme.of(context).colorScheme.primary,
48 strokeWidth: .7,
49 ),
50 ),
51 ElevatedButton(
52 style: ElevatedButton.styleFrom(
53 backgroundColor: Colors.transparent,
54 foregroundColor: Theme.of(context).colorScheme.primary,
55 shape: RoundedRectangleBorder(
56 borderRadius: BorderRadius.circular(80),
57 ),
58 ),
59 onPressed: onPressed,
60 child: Icon(icon),
61 ),
62 ],
63 );
64 }
65}
final Function() onPressed
final IconData icon
final VoidCallback onPressed
override Widget build(BuildContext context)
const ActionButtons({super.key})
_buildActionButton({ required IconData icon, required Function() onPressed, required BuildContext context, })
final Widget child
final Color backgroundColor
final Color progressColor
final double progress