feat:增加底部标题栏
This commit is contained in:
22
lib/layout/nav_bar.dart
Normal file
22
lib/layout/nav_bar.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'menu.dart';
|
||||
|
||||
Widget buildBottomNavigationBar({
|
||||
required BuildContext context,
|
||||
required int index,
|
||||
required Function(int) onTap,
|
||||
}) {
|
||||
return BottomNavigationBar(
|
||||
currentIndex: index,
|
||||
onTap: onTap,
|
||||
items: bottomNavItems,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
selectedItemColor: Theme.of(context).colorScheme.primary,
|
||||
unselectedItemColor: Colors.grey,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 8,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user