2/22/1
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/credential.dart';
|
||||
|
||||
class BottomBarController extends GetxController {
|
||||
var currentIndex = 0.obs;
|
||||
@@ -20,49 +19,49 @@ class HomeScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Bottom Bar Example'),
|
||||
title: Text('Bottom Bar Example'.tr),
|
||||
),
|
||||
body: Obx(() => IndexedStack(
|
||||
index: controller.currentIndex.value,
|
||||
children: [
|
||||
children: const [
|
||||
HomeView(),
|
||||
const ProfileView(),
|
||||
const StatisticsView(),
|
||||
const WalletView(),
|
||||
ProfileView(),
|
||||
StatisticsView(),
|
||||
WalletView(),
|
||||
],
|
||||
)),
|
||||
bottomNavigationBar: Obx(() => BottomNavigationBar(
|
||||
backgroundColor: Colors.greenAccent,
|
||||
currentIndex: controller.currentIndex.value,
|
||||
onTap: controller.changePage,
|
||||
items: const [
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.home,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Home',
|
||||
label: 'Home'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.person,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Profile',
|
||||
label: 'Profile'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.bar_chart,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Statistics',
|
||||
label: 'Statistics'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.account_balance_wallet,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Wallet',
|
||||
label: 'Wallet'.tr,
|
||||
),
|
||||
],
|
||||
)),
|
||||
@@ -76,7 +75,7 @@ class HomeView extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map<String, dynamic> data;
|
||||
return Center(
|
||||
return const Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Home View'),
|
||||
|
||||
Reference in New Issue
Block a user