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/services/app_info.service.dart'; class LandingController extends GetxController { RxInt currentIndex = 0.obs; List iconList = [Icons.home_max, Icons.person_outline_rounded]; RxList bottomNavItems = RxList([]); List pages = []; @override onInit() { super.onInit(); List roleWithBottomNavItems = AppInfoService.to.bottomNavItems!; bottomNavItems.assignAll(roleWithBottomNavItems .map((e) => BottomNavigationBarItem( icon: e.icon, activeIcon: e.activeIcon, label: e.label)) .toList()); pages = roleWithBottomNavItems.map((e) => e.page!).toList(); } }