48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:sk_base_mobile/apis/index.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';
|
|
import 'package:sk_base_mobile/services/app_info.service.dart';
|
|
import 'package:sk_base_mobile/util/device.util.dart';
|
|
import 'package:sk_base_mobile/util/modal.util.dart';
|
|
|
|
import '../../constants/constants.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(isPage: true)),
|
|
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();
|
|
AppInfoService.to.checkVersion();
|
|
}
|
|
}
|