Files
TubeCards/lib/modules/home/component/bottom_navigation_button.dart
friebetill 80f218097d Initial commit
Add Space version 2.0.1
2022-03-28 14:56:00 +02:00

37 lines
888 B
Dart

import 'package:flutter/material.dart';
class BottomNavigationButton extends StatelessWidget {
const BottomNavigationButton({
required this.onTap,
required this.icon,
required this.label,
required this.isSelected,
Key? key,
}) : super(key: key);
final VoidCallback onTap;
final IconData icon;
final String label;
final bool isSelected;
@override
Widget build(BuildContext context) {
final color = isSelected
? Theme.of(context).colorScheme.primary
: Theme.of(context).iconTheme.color;
final labelStyle =
Theme.of(context).textTheme.bodyText2!.copyWith(color: color);
return InkResponse(
onTap: onTap,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, color: color),
Text(label, style: labelStyle),
],
),
);
}
}