41 lines
1.3 KiB
Dart
41 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:sk_base_mobile/models/app_bottom_nav_item.dart';
|
|
import 'package:sk_base_mobile/screens/inventory/inventory.dart';
|
|
import 'package:sk_base_mobile/screens/inventory_inout/inventory_inout.dart';
|
|
import 'package:sk_base_mobile/screens/mine/mine.dart';
|
|
import 'package:sk_base_mobile/screens/workbench/workbench.dart';
|
|
|
|
class LandingController extends GetxController {
|
|
RxInt currentIndex = 0.obs;
|
|
RxBool showCreateBtn = true.obs;
|
|
List<Widget> pages = [];
|
|
List<AppBottomNavItem>? bottomNavItems = [
|
|
AppBottomNavItem(
|
|
icon: Icons.home_max_outlined,
|
|
activeIcon: Icons.home_max_outlined,
|
|
label: '登记',
|
|
page: InvenotryInoutPage()),
|
|
AppBottomNavItem(
|
|
icon: Icons.inventory_outlined,
|
|
activeIcon: Icons.inventory_rounded,
|
|
label: '库存',
|
|
page: const InventoryPage()),
|
|
AppBottomNavItem(
|
|
icon: Icons.widgets_outlined,
|
|
activeIcon: Icons.widgets_rounded,
|
|
label: '工作台',
|
|
page: WorkBenchPage()),
|
|
AppBottomNavItem(
|
|
icon: Icons.person_outline_outlined,
|
|
activeIcon: Icons.person,
|
|
label: '我的',
|
|
page: const MinePage()),
|
|
];
|
|
@override
|
|
onInit() {
|
|
super.onInit();
|
|
pages = bottomNavItems!.map((e) => e.page!).toList();
|
|
}
|
|
}
|