mobile_skt/lib/screens/landing/landing_controller.dart

42 lines
1.4 KiB
Dart
Raw Normal View History

2024-03-19 11:09:07 +08:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
2024-03-26 16:02:49 +08:00
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';
2024-03-19 11:09:07 +08:00
import 'package:sk_base_mobile/services/app_info.service.dart';
class LandingController extends GetxController {
RxInt currentIndex = 0.obs;
RxBool showCreateBtn = true.obs;
2024-03-19 11:09:07 +08:00
List<Widget> pages = [];
2024-03-26 16:02:49 +08:00
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: InventoryPage()),
AppBottomNavItem(
icon: Icons.widgets_outlined,
activeIcon: Icons.widgets_rounded,
label: '工作台',
page: WorkBenchPage()),
AppBottomNavItem(
icon: Icons.person_outline_outlined,
activeIcon: Icons.person,
label: '我的',
page: MinePage()),
];
2024-03-19 11:09:07 +08:00
@override
onInit() {
super.onInit();
2024-03-26 16:02:49 +08:00
pages = bottomNavItems!.map((e) => e.page!).toList();
2024-03-19 11:09:07 +08:00
}
}