48 lines
1.2 KiB
Dart
48 lines
1.2 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:lamiter/Extension/build_context.dart';
|
|
|
|
class CompanyBottomNavigationBar extends StatelessWidget {
|
|
final int currentIndex;
|
|
final Function(int)? onTap;
|
|
|
|
const CompanyBottomNavigationBar({
|
|
super.key,
|
|
required this.currentIndex,
|
|
this.onTap,
|
|
});
|
|
|
|
final List<BottomNavigationBarItem> items = const <BottomNavigationBarItem>[
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.business_sharp),
|
|
label: '合作廠商',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.diversity_1_sharp),
|
|
label: '旗下管理師',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.add_shopping_cart_sharp),
|
|
label: '旗下產品',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.settings_sharp),
|
|
label: '設定',
|
|
),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CupertinoTabBar(
|
|
items: items,
|
|
onTap: onTap,
|
|
border: null,
|
|
iconSize: 24.sp,
|
|
currentIndex: currentIndex,
|
|
backgroundColor: context.surface.withOpacity(0.75),
|
|
activeColor: context.inverseSurface.withOpacity(0.75),
|
|
);
|
|
}
|
|
}
|