This commit is contained in:
2024-01-04 16:41:51 +08:00
parent 55085ee563
commit 47f82097e2
22 changed files with 483 additions and 645 deletions

View File

@@ -0,0 +1,46 @@
import 'package:get/get.dart';
import 'data_count_state.dart';
class DataCountLogic extends GetxController {
final DataCountState state = DataCountState();
final List<Map<String, String>> list = [
{
"title": "今日成交额",
"value": "100000",
},
{
"title": "昨日成交额",
"value": "2000",
},
{
"title": "本月成交额",
"value": "10000",
},
{
"title": "今日订单数",
"value": "100",
},
{
"title": "昨日订单数",
"value": "200",
},
{
"title": "本月订单数",
"value": "5000",
},
];
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}

View File

@@ -0,0 +1,5 @@
class DataCountState {
DataCountState() {
///Initialize variables
}
}

View File

@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'data_count_logic.dart';
class DataCountComponent extends StatelessWidget {
const DataCountComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final logic = Get.put(DataCountLogic());
final state = Get.find<DataCountLogic>().state;
return Wrap(
direction: Axis.horizontal,
spacing: 55,
runSpacing: 15,
alignment: WrapAlignment.center,
children: logic.list.map((item) {
return Column(
children: [
Text(
item["title"]!,
style: const TextStyle(
color: Colors.grey,
fontSize: 16,
),
),
Text(
item["value"]!,
style: const TextStyle(
color: Colors.black,
fontSize: 19,
fontWeight: FontWeight.bold),
),
],
);
}).toList());
}
}

View File

@@ -0,0 +1,5 @@
library data_count_component;
export './data_count_logic.dart';
export './data_count_state.dart';
export './data_count_view.dart';

View File

@@ -0,0 +1,19 @@
import 'package:get/get.dart';
import 'header_state.dart';
class HeaderLogic extends GetxController {
final HeaderState state = HeaderState();
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}

View File

@@ -0,0 +1,5 @@
class HeaderState {
HeaderState() {
///Initialize variables
}
}

View File

@@ -0,0 +1,59 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../../utils/utils.dart';
import 'header_logic.dart';
class HeaderComponent extends StatelessWidget {
const HeaderComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final logic = Get.put(HeaderLogic());
final state = Get.find<HeaderLogic>().state;
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
"https://pic.ziyuan.wang/user/guest/2023/12/微信图片_20231109211458_c1a41ab0fd7dd.jpg",
width: 50.0,
)),
const SizedBox(
width: 5,
),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"商家: GAGA酒吧",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
),
Text(
"Huakk,欢迎回来!!!",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
)
],
)
],
),
Row(
children: [
IconButton(
onPressed: () {
ToolFn.tips("点击了核销按钮");
},
icon: const Icon(
Icons.qr_code_scanner,
size: 32,
))
],
)
],
);
}
}

View File

@@ -0,0 +1,5 @@
library header_component;
export './header_logic.dart';
export './header_state.dart';
export './header_view.dart';

View File

@@ -0,0 +1,5 @@
library menu_component;
export './menu_view.dart';
export './menu_state.dart';
export './menu_logic.dart';

View File

@@ -0,0 +1,64 @@
import 'package:get/get.dart';
import 'menu_state.dart';
class MenuLogic extends GetxController {
final MenuState state = MenuState();
final List menuList = [
{
"icon": "https://pic.ziyuan.wang/user/guest/2023/12/ 1_fac68ecc764a6.png",
"title": "商品管理",
"page": "/good",
},
{
"icon": "https://pic.ziyuan.wang/user/guest/2023/12/ 1_fac68ecc764a6.png",
"title": "订单管理",
"page": "/order",
},
{
"icon": "https://pic.ziyuan.wang/user/guest/2023/12/ 1_fac68ecc764a6.png",
"title": "店铺设置",
"page": "/settings"
},
{
"icon": "https://pic.ziyuan.wang/user/guest/2023/12/ 1_fac68ecc764a6.png",
"title": "发布商品",
"page": "/addGood"
},
{
"icon": "https://pic.ziyuan.wang/user/guest/2023/12/ 1_fac68ecc764a6.png",
"title": "数据统计",
"page": "/data"
},
{
"icon":
"https://pic.ziyuan.wang/user/guest/2023/12/%201%20_1__eb4ee5cc67484.png",
"title": "提现管理",
"page": "/cash"
},
{
"icon":
"https://pic.ziyuan.wang/user/guest/2023/12/%201%20_1__eb4ee5cc67484.png",
"title": "员工管理",
"page": "/perm"
}
];
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
// 跳转页面
void goPage(String page) {
Get.toNamed(page);
}
}

View File

@@ -0,0 +1,5 @@
class MenuState {
MenuState() {
///Initialize variables
}
}

View File

@@ -0,0 +1,66 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'menu_logic.dart';
class MenuComponent extends StatelessWidget {
const MenuComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final logic = Get.put(MenuLogic());
final state = Get.find<MenuLogic>().state;
// return SizedBox(
// width: double.infinity,
// child: Wrap(
// direction: Axis.horizontal,
// alignment: WrapAlignment.spaceBetween,
// spacing: 15,
// runSpacing: 10,
// children: logic.menuList.map((item) {
// return GestureDetector(
// onTap: () {
// logic.goPage(item["page"]);
// },
// child: Column(
// children: [
// Image(
// image: NetworkImage(item["icon"]),
// width: 65,
// ),
// Text(item["title"],
// style: const TextStyle(fontWeight: FontWeight.w500))
// ],
// ),
// );
// }).toList(),
// ),
// );
return SizedBox(
height: 175.h,
child: GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 5, childAspectRatio: 0.8),
children: logic.menuList.map((item) {
return GestureDetector(
onTap: () {
logic.goPage(item["page"]);
},
child: Column(
children: [
Image(
image: NetworkImage(item["icon"]),
width: 65.w,
),
Text(item["title"],
style: const TextStyle(fontWeight: FontWeight.w500))
],
),
);
}).toList()),
);
}
}

View File

@@ -0,0 +1,5 @@
library order_card_component;
export './order_card_logic.dart';
export './order_card_state.dart';
export './order_card_view.dart';

View File

@@ -0,0 +1,53 @@
import 'package:get/get.dart';
import 'order_card_state.dart';
class OrderCardLogic extends GetxController {
final OrderCardState state = OrderCardState();
final List<Map<String, String>> list = [
{
"id": "0",
"title": "全部",
"value": "2000",
},
{
"id": "1",
"title": "待付款",
"value": "10",
},
{
"id": "2",
"title": "待核销",
"value": "200",
},
{
"id": "3",
"title": "已核销",
"value": "2000",
},
{
"id": "4",
"title": "已过期",
"value": "100",
},
];
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
void toPage(String index) {
Get.toNamed('/order_list', arguments: {
"type": index,
});
}
}

View File

@@ -0,0 +1,5 @@
class OrderCardState {
OrderCardState() {
///Initialize variables
}
}

View File

@@ -0,0 +1,58 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'order_card_logic.dart';
class OrderCardComponent extends StatelessWidget {
const OrderCardComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final logic = Get.put(OrderCardLogic());
final state = Get.find<OrderCardLogic>().state;
return Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list.map((item) {
return GestureDetector(
onTap: () {
// ToolFn.tips("点击了${item["title"]}");
logic.toPage(item["id"].toString());
},
child: SizedBox(
height: 90,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
);
}
}

View File

@@ -5,56 +5,6 @@ import 'home_state.dart';
class HomeLogic extends GetxController {
final HomeState state = HomeState();
final List<Map<String, String>> list = [
{
"title": "今日成交额",
"value": "100000",
},
{
"title": "昨日成交额",
"value": "2000",
},
{
"title": "本月成交额",
"value": "10000",
},
{
"title": "今日订单数",
"value": "100",
},
{
"title": "昨日订单数",
"value": "200",
},
{
"title": "本月订单数",
"value": "5000",
},
];
final List<Map<String, String>> list2 = [
{
"title": "全部",
"value": "2000",
},
{
"title": "待付款",
"value": "10",
},
{
"title": "待核销",
"value": "200",
},
{
"title": "已核销",
"value": "2000",
},
{
"title": "已过期",
"value": "100",
},
];
@override
void onReady() {
// TODO: implement onReady

View File

@@ -1,441 +0,0 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../../utils/utils.dart';
import 'home_logic.dart';
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final logic = Get.find<HomeLogic>();
final state = Get.find<HomeLogic>().state;
double statusBarHeight = MediaQuery.of(context).padding.top;
return PopScope(
canPop: false,
onPopInvoked: (_) {
ToolFn().isExit();
},
child: Scaffold(
body: Stack(
fit: StackFit.expand,
children: [
Image.asset(
'assets/images/home-tab-normal-bg.png',
fit: BoxFit.fitWidth,
),
Padding(
padding:
EdgeInsets.only(top: statusBarHeight, left: 10, right: 10),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
"https://pic.ziyuan.wang/user/guest/2023/12/微信图片_20231109211458_c1a41ab0fd7dd.jpg",
width: 50.0,
)),
const SizedBox(
width: 5,
),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"商家: GAGA酒吧",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500),
),
Text(
"Huakk,欢迎回来!!!",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400),
)
],
)
],
),
Row(
children: [
GestureDetector(
onTap: () {
ToolFn.tips("点击了核销按钮");
},
child: const Icon(
Icons.qr_code_scanner,
size: 32,
),
),
],
)
],
),
const SizedBox(
height: 20,
),
Wrap(
direction: Axis.horizontal,
spacing: 70,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list.map((item) {
return Column(
children: [
Text(
item["title"]!,
style: const TextStyle(
color: Colors.grey,
fontSize: 15,
),
),
Text(
item["value"]!,
style: const TextStyle(
color: Colors.black,
fontSize: 20,
fontWeight: FontWeight.bold),
),
],
);
}).toList()),
// const SizedBox(
// height: 10,
// ),
ListView(shrinkWrap: true, children: [
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
]),
],
))
],
)));
}
}

View File

@@ -3,6 +3,10 @@ import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../../utils/utils.dart';
import 'components/data_count/index.dart';
import 'components/header/header_view.dart';
import 'components/menu/index.dart';
import 'components/order_card/index.dart';
import 'home_logic.dart';
class HomePage extends StatelessWidget {
@@ -20,6 +24,7 @@ class HomePage extends StatelessWidget {
},
child: Scaffold(
body: Container(
width: double.maxFinite,
padding: const EdgeInsets.only(top: 0, left: 10, right: 10),
decoration: const BoxDecoration(
image: DecorationImage(
@@ -29,128 +34,19 @@ class HomePage extends StatelessWidget {
),
child: ListView(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
"https://pic.ziyuan.wang/user/guest/2023/12/微信图片_20231109211458_c1a41ab0fd7dd.jpg",
width: 50.0,
)),
const SizedBox(
width: 5,
),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"商家: GAGA酒吧",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.w500),
),
Text(
"Huakk,欢迎回来!!!",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.w400),
)
],
)
],
),
Row(
children: [
IconButton(
onPressed: () {
ToolFn.tips("点击了核销按钮");
},
icon: const Icon(
Icons.qr_code_scanner,
size: 32,
))
],
)
],
),
const SizedBox(
height: 20,
),
Wrap(
direction: Axis.horizontal,
spacing: 70,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list.map((item) {
return Column(
children: [
Text(
item["title"]!,
style: const TextStyle(
color: Colors.grey,
fontSize: 15,
),
),
Text(
item["value"]!,
style: const TextStyle(
color: Colors.black,
fontSize: 20,
fontWeight: FontWeight.bold),
),
],
);
}).toList()),
const SizedBox(
HeaderComponent(),
SizedBox(
height: 10,
),
Container(
constraints: const BoxConstraints.tightFor(
width: double.maxFinite,
),
decoration: BoxDecoration(
color: Colors.blueAccent,
borderRadius: BorderRadius.circular(15),
),
child: Wrap(
direction: Axis.horizontal,
spacing: 25,
runSpacing: 10,
alignment: WrapAlignment.center,
children: logic.list2.map((item) {
return GestureDetector(
onTap: () {
ToolFn.tips("点击了${item["title"]}");
},
child: SizedBox(
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item["value"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
item["title"]!,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
),
),
],
),
),
);
}).toList()),
),
const SizedBox(
DataCountComponent(),
SizedBox(
height: 10,
),
OrderCardComponent(),
SizedBox(
height: 10,
),
MenuComponent(),
],
),
)));

View File

@@ -37,7 +37,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
void initAnimation() {
animationController = AnimationController(
vsync: this,
duration: const Duration(seconds: 1),
duration: const Duration(milliseconds: 500),
);
animation = Tween<Offset>(

View File

@@ -1,3 +1,6 @@
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@@ -28,47 +31,32 @@ class TabPage extends StatelessWidget {
);
}
List<BottomNavigationBarItem> createBottomItems() {
return <BottomNavigationBarItem>[
const BottomNavigationBarItem(
icon: Icon(
TDIcons.dashboard,
color: Colors.grey,
),
activeIcon: Icon(
TDIcons.dashboard,
color: Color.fromRGBO(0, 82, 217, 1),
),
label: "工作台",
List<NavigationDestination> createBottomItems() {
return <NavigationDestination>[
const NavigationDestination(
selectedIcon: Icon(TDIcons.dashboard, color: Colors.white),
icon: Icon(TDIcons.dashboard),
label: '工作台',
),
const BottomNavigationBarItem(
icon: Icon(
TDIcons.desktop,
color: Colors.grey,
),
activeIcon: Icon(
TDIcons.desktop,
color: Color.fromRGBO(0, 82, 217, 1),
),
label: "商家中心",
const NavigationDestination(
selectedIcon: Icon(TDIcons.desktop, color: Colors.white),
icon: Icon(TDIcons.desktop),
label: '商家中心',
),
];
}
/// 底部导航
Widget buildBottomNavigationBar() {
List<BottomNavigationBarItem> bottomItems = createBottomItems();
return BottomNavigationBar(
items: bottomItems,
currentIndex: state.currentPage,
List<NavigationDestination> bottomItems = createBottomItems();
return NavigationBar(
backgroundColor: Colors.white,
unselectedItemColor: Colors.grey,
selectedItemColor: const Color.fromRGBO(0, 82, 217, 1),
type: BottomNavigationBarType.fixed,
onTap: logic.handleNavBarTap,
selectedFontSize: 10.sp,
unselectedFontSize: 10.sp,
iconSize: 32.w,
shadowColor: Colors.black,
surfaceTintColor: Colors.white,
indicatorColor: Colors.blueAccent,
onDestinationSelected: logic.handleNavBarTap,
selectedIndex: state.currentPage,
destinations: bottomItems,
);
}

View File

@@ -18,6 +18,8 @@ class AppPages {
binding: SplashBinding()),
GetPage(
name: AppPages.login, page: () => LoginPage(), binding: LoginBinding()),
GetPage(
name: AppPages.tab, page: () => const TabPage(), binding: TabBinding()),
GetPage(
name: AppPages.home,
page: () => const HomePage(),
@@ -26,7 +28,5 @@ class AppPages {
name: AppPages.user,
page: () => const UserPage(),
binding: UserBinding()),
GetPage(
name: AppPages.tab, page: () => const TabPage(), binding: TabBinding()),
];
}