Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
main_menu_button.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3
4class CollectionButton extends StatelessWidget {
6 super.key,
7 required this.onPressed,
8 required this.icon,
9 required this.label,
10 });
11
12 final VoidCallback onPressed;
13
14 final IconData icon;
15 final String label;
16
17 @override
18 Widget build(BuildContext context) {
19 return ElevatedButton(
20 style: ElevatedButton.styleFrom(
21 backgroundColor: Theme.of(context).colorScheme.surface,
22 ),
24 child: Column(
25 crossAxisAlignment: CrossAxisAlignment.center,
26 mainAxisAlignment: MainAxisAlignment.center,
27 children: [
28 Icon(
29 icon,
30 color: Theme.of(context).colorScheme.primary,
31 size: 28.sp,
32 ),
33 SizedBox(height: 13.sp),
34 Text(
35 label.toUpperCase(),
36 textAlign: TextAlign.center,
37 maxLines: 2,
38 style: Theme.of(context)
39 .textTheme
40 .displaySmall
41 ?.copyWith(fontSize: 10.5.sp),
42 ),
43 ],
44 ),
45 );
46 }
47}
final IconData icon
final VoidCallback onPressed
const CollectionButton({ super.key, required this.onPressed, required this.icon, required this.label, })
final Widget child
override Widget build(BuildContext context)
final String label
final Color backgroundColor