FreekakeApp/lib/components/menu_button.dart
2025-04-15 09:58:28 +07:00

54 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class MenuButton extends StatelessWidget {
final String? label;
final String? icon;
final VoidCallback? onPress;
final bool? isSelected;
final double? w;
final double? h;
const MenuButton({
super.key,
this.label,
this.icon,
this.onPress,
this.isSelected,
this.w,
this.h,
});
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: SvgPicture.asset(
icon ?? '',
width: w ?? 24,
height: h ?? 24,
// allowDrawingOutsideViewBox: true,
colorFilter: ColorFilter.mode(
Color.fromARGB(255, 255, 255, 255),
BlendMode.srcIn,
),
),
onPressed: onPress,
),
Text(
label ?? '',
style: TextStyle(
color: Color.fromARGB(255, 239, 224, 232),
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
),
);
}
}