Files
apskel-owner-flutter/lib/presentation/pages/main/widgets/bottom_navbar.dart
T
efrilm ac991431c8
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s
feat: add order
2026-08-21 23:24:46 +07:00

57 lines
1.7 KiB
Dart

import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:hugeicons/hugeicons.dart';
import '../../../../common/extension/extension.dart';
class MainBottomNavbar extends StatefulWidget {
final TabsRouter tabsRouter;
const MainBottomNavbar({super.key, required this.tabsRouter});
@override
State<MainBottomNavbar> createState() => _MainBottomNavbarState();
}
class _MainBottomNavbarState extends State<MainBottomNavbar> {
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
currentIndex: widget.tabsRouter.activeIndex,
onTap: (index) {
setState(() {
widget.tabsRouter.setActiveIndex(index);
});
},
type: BottomNavigationBarType.fixed,
items: [
BottomNavigationBarItem(
icon: HugeIcon(icon: HugeIcons.strokeRoundedHome01),
label: context.lang.home,
tooltip: context.lang.home,
),
BottomNavigationBarItem(
icon: HugeIcon(icon: HugeIcons.strokeRoundedBorderFull),
label: context.lang.order,
tooltip: context.lang.order,
),
BottomNavigationBarItem(
icon: HugeIcon(icon: HugeIcons.strokeRoundedChart03),
label: context.lang.report,
tooltip: context.lang.report,
),
BottomNavigationBarItem(
icon: HugeIcon(icon: HugeIcons.strokeRoundedPackage),
label: context.lang.stock,
tooltip: context.lang.stock,
),
BottomNavigationBarItem(
icon: HugeIcon(icon: HugeIcons.strokeRoundedUser),
label: context.lang.profile,
tooltip: context.lang.profile,
),
],
);
}
}