한번 좆되서 다시 돌림
This commit is contained in:
56
lib/common/widgets/custom_bottom_nav_bar.dart
Normal file
56
lib/common/widgets/custom_bottom_nav_bar.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomBottomNavBar extends StatelessWidget {
|
||||
final int currentIndex;
|
||||
final Function(int) onTap;
|
||||
|
||||
const CustomBottomNavBar({
|
||||
super.key,
|
||||
required this.currentIndex,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double customBottomNavHeight = 94.0;
|
||||
const double customBottomNavIconSize = 22.0;
|
||||
const double customBottomNavSelectedFontSize = 10.0;
|
||||
const double customBottomNavUnselectedFontSize = 8.0;
|
||||
|
||||
return SizedBox(
|
||||
height: customBottomNavHeight,
|
||||
child: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home_filled),
|
||||
label: 'Home',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.calendar_today_outlined),
|
||||
label: 'Plan',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.bar_chart_outlined),
|
||||
label: 'Statistics',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.work_outline),
|
||||
label: 'Jobs',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.more_horiz_outlined),
|
||||
label: 'More',
|
||||
),
|
||||
],
|
||||
currentIndex: currentIndex,
|
||||
|
||||
unselectedItemColor: Colors.blue,
|
||||
onTap: onTap,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
iconSize: customBottomNavIconSize,
|
||||
selectedFontSize: customBottomNavSelectedFontSize,
|
||||
unselectedFontSize: customBottomNavUnselectedFontSize,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user