This commit is contained in:
Hamza-Ayed
2024-02-22 16:19:45 +03:00
parent 9d839f02ae
commit a9f557ca83
85 changed files with 9196 additions and 494 deletions

View File

@@ -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'),