navbar and setting bar is done
This commit is contained in:
24
lib/screens/attendence_screen.dart
Normal file
24
lib/screens/attendence_screen.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
// lib/screens/attendance_screen.dart
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AttendanceScreen extends StatelessWidget {
|
||||
const AttendanceScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
// This is where your attendance content will go
|
||||
// For now, it's just a placeholder
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Attendance Content',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,29 +8,21 @@ class AuthScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: AppBackground(
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 60),
|
||||
// Logo
|
||||
Center(
|
||||
child: Image.asset("assets/images/logo2.png", width: 200),
|
||||
),
|
||||
Center(child: Image.asset("assets/images/logo2.png", width: 200)),
|
||||
// const SizedBox(height: 15),
|
||||
// Form - taking remaining space and centered
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: const AuthForm(),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: Center(child: const AuthForm())),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
lib/screens/finance_screen.dart
Normal file
19
lib/screens/finance_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FinanceScreen extends StatelessWidget {
|
||||
const FinanceScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text(
|
||||
'المالية',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/screens/holiday_screen.dart
Normal file
19
lib/screens/holiday_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HolidayScreen extends StatelessWidget {
|
||||
const HolidayScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text(
|
||||
'الإجازة',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
79
lib/screens/main_screen.dart
Normal file
79
lib/screens/main_screen.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../widgets/app_background.dart';
|
||||
import '../widgets/floatingnavbar.dart';
|
||||
import '../widgets/settings_bar.dart';
|
||||
import '../screens/attendence_screen.dart';
|
||||
import '../screens/finance_screen.dart';
|
||||
import '../screens/holiday_screen.dart';
|
||||
|
||||
class MainPage extends StatefulWidget {
|
||||
const MainPage({super.key});
|
||||
|
||||
@override
|
||||
State<MainPage> createState() => _MainPageState();
|
||||
}
|
||||
|
||||
class _MainPageState extends State<MainPage> {
|
||||
int _currentIndex = 0;
|
||||
int _settingsIndex = 0;
|
||||
|
||||
final List<Widget> _screens = [
|
||||
const AttendanceScreen(),
|
||||
const FinanceScreen(),
|
||||
const HolidayScreen(),
|
||||
];
|
||||
|
||||
final List<NavBarItem> _navItems = [
|
||||
NavBarItem(iconPath: 'assets/images/attendance.svg', label: 'الحضور'),
|
||||
NavBarItem(iconPath: 'assets/images/finance.svg', label: 'المالية'),
|
||||
NavBarItem(iconPath: 'assets/images/holiday.svg', label: 'الإجازة'),
|
||||
];
|
||||
|
||||
final List<String> _settingsIconPaths = [
|
||||
'assets/images/user.svg',
|
||||
'assets/images/ball.svg',
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: AppBackground(
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
SettingsBar(
|
||||
selectedIndex: _settingsIndex,
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
_settingsIndex = index;
|
||||
});
|
||||
},
|
||||
showBackButton: false,
|
||||
iconPaths: _settingsIconPaths,
|
||||
),
|
||||
|
||||
// Main content area
|
||||
Expanded(
|
||||
child: IndexedStack(index: _currentIndex, children: _screens),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
|
||||
Floatingnavbar(
|
||||
items: _navItems,
|
||||
selectedIndex: _currentIndex,
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user