41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:food_hub_app/models/layout.dart';
|
|
import 'package:food_hub_app/views/moment.dart';
|
|
import 'package:food_hub_app/views/profile.dart';
|
|
import 'package:food_hub_app/views/record.dart';
|
|
import 'package:food_hub_app/views/stats.dart';
|
|
|
|
final List<PageInfo> pages = [
|
|
PageInfo(
|
|
label: "记录",
|
|
icon: Icons.home_outlined,
|
|
activeIcon: Icons.home,
|
|
page: RecordPage(),
|
|
),
|
|
PageInfo(
|
|
label: "统计",
|
|
icon: Icons.pie_chart_outline,
|
|
activeIcon: Icons.pie_chart,
|
|
page: StatsPage(),
|
|
),
|
|
PageInfo(
|
|
label: "朋友圈",
|
|
icon: Icons.group_outlined,
|
|
activeIcon: Icons.group,
|
|
page: MomentPage(),
|
|
),
|
|
PageInfo(
|
|
label: "我的",
|
|
icon: Icons.account_circle_outlined,
|
|
activeIcon: Icons.account_circle,
|
|
page: ProfilePage(),
|
|
),
|
|
];
|
|
|
|
final List<BottomNavigationBarItem> bottomNavItems =
|
|
pages.map((page) {
|
|
return BottomNavigationBarItem(icon: Icon(page.icon), label: page.label);
|
|
}).toList();
|
|
|
|
final List<Widget> tabPages = pages.map((item) => item.page).toList();
|