You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
635 B
Dart

import 'package:flutter/cupertino.dart';
class NavBarButton extends StatelessWidget {
final IconData icon;
final VoidCallback? onPressed;
final String? semanticLabel;
const NavBarButton(
{super.key, required this.icon, this.onPressed, this.semanticLabel});
@override
Widget build(BuildContext context) {
final theme = CupertinoTheme.of(context);
var color = theme.textTheme.navActionTextStyle.color ?? theme.primaryColor;
return CupertinoButton(
padding: EdgeInsets.zero,
onPressed: onPressed,
child: Icon(
icon,
color: color,
size: 26,
),
);
}
}