ontimehaulers/lib/widgets/custom_navigation_bar.dart

42 lines
1.1 KiB
Dart
Raw Permalink Normal View History

2024-11-05 12:29:06 +00:00
import 'package:flutter/material.dart';
class CustomNavigationBar extends StatelessWidget {
final int selectedIndex;
final void Function(int) onItemTapped;
const CustomNavigationBar({
super.key,
required this.selectedIndex,
required this.onItemTapped,
});
@override
Widget build(BuildContext context) {
return NavigationBar(
selectedIndex: selectedIndex,
onDestinationSelected: onItemTapped,
labelBehavior: NavigationDestinationLabelBehavior.alwaysHide,
destinations: const [
NavigationDestination(
icon: Icon(Icons.home),
label: 'Home'
),
NavigationDestination(
icon: Icon(Icons.format_quote),
label: 'Quote'
),
NavigationDestination(
icon: Icon(Icons.radar),
label: 'Tracking'
),
NavigationDestination(
icon: Icon(Icons.account_box),
label: 'Login'
),
NavigationDestination(
icon: Icon(Icons.person_add),
label: 'Setup'
),
],
);
}
}