约定 顶部 烂

This commit is contained in:
GYJ
2024-11-22 18:03:56 +08:00
parent 8d57c7f406
commit 87c41341fd
7 changed files with 263 additions and 25 deletions

View File

@@ -40,7 +40,7 @@ class HomeView extends BaseUI {
Widget _buildLeftBar(BuildContext context) {
HomeViewModel provider =
getProvider(context, listen: false) as HomeViewModel;
const double leftBarWidth = 120;
const double leftBarWidth = 100;
double itemHeight = (MediaQuery.of(context).size.height -
leftBarWidth -
MediaQuery.of(context).padding.top) /
@@ -60,26 +60,26 @@ class HomeView extends BaseUI {
}
Widget _buildRightContainer(BuildContext context) {
HomeViewModel provider =
getProvider(context, listen: false) as HomeViewModel;
getProvider(context, listen: false) as HomeViewModel;
return Expanded(
child: Container(
color: Colors.amber,
child: MultiProvider(
providers: [
ChangeNotifierProvider<ReserveViewModel>(
create: (_) => ReserveViewModel(),
),
ChangeNotifierProvider<OrderViewModel>(
create: (_) => OrderViewModel(),
),
],
child: PageView(
controller: provider.pageController,
children: _buildPageViews(context, provider),
),
child: MultiProvider(
providers: [
ChangeNotifierProvider<ReserveViewModel>(
create: (_) => ReserveViewModel(),
),
ChangeNotifierProvider<OrderViewModel>(
create: (_) => OrderViewModel(),
),
],
child: PageView(
physics: const NeverScrollableScrollPhysics(),
controller: provider.pageController,
children: _buildPageViews(context, provider),
),
),
));
}
@@ -137,15 +137,15 @@ class HomeView extends BaseUI {
provider.currentIndex == index
? "images/tabbar/${provider.tabIcons[index]}_select.png"
: "images/tabbar/${provider.tabIcons[index]}_normal.png",
width: 23,
height: 27,
width: 20,
height: 23,
),
const SizedBox(height: 5),
const SizedBox(height: 3),
Text(
provider.tabTitles[index],
style: provider.currentIndex == index
? const TextStyle(color: Colors.white, fontSize: 14)
: const TextStyle(color: Colors.grey, fontSize: 14),
? const TextStyle(color: Colors.white, fontSize: 12)
: const TextStyle(color: Colors.grey, fontSize: 12),
)
],
),