22222
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:coda_project/screens/notifications_screen.dart';
|
||||
import 'package:coda_project/screens/user_settings_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../widgets/login_animation.dart';
|
||||
import '../widgets/settings_bar.dart';
|
||||
|
||||
class AttendanceScreen extends StatelessWidget {
|
||||
@@ -17,45 +16,43 @@ class AttendanceScreen extends StatelessWidget {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Stack(
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height
|
||||
|
||||
),
|
||||
SizedBox(height: MediaQuery.of(context).size.height),
|
||||
|
||||
/// ------------------------------
|
||||
/// SETTINGS BAR (STATIC)
|
||||
/// ------------------------------
|
||||
SafeArea(
|
||||
child:SettingsBar(
|
||||
selectedIndex: 0,
|
||||
showBackButton: false,
|
||||
iconPaths: [
|
||||
'assets/images/user.svg',
|
||||
'assets/images/ball.svg',
|
||||
],
|
||||
onTap: (index) {
|
||||
if (index == 0) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => UserSettingsScreen(),
|
||||
),
|
||||
);
|
||||
} else if (index == 1) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NotificationsScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
child: SettingsBar(
|
||||
selectedIndex: 0,
|
||||
showBackButton: false,
|
||||
iconPaths: ['assets/images/user.svg', 'assets/images/ball.svg'],
|
||||
onTap: (index) {
|
||||
if (index == 0) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => UserSettingsScreen(),
|
||||
),
|
||||
);
|
||||
} else if (index == 1) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NotificationsScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
/// ------------------------------
|
||||
/// GREETING TEXT
|
||||
/// ------------------------------
|
||||
Positioned(
|
||||
top: screenHeight * 0.14, // moved down because settings bar now exists
|
||||
top:
|
||||
screenHeight *
|
||||
0.14, // moved down because settings bar now exists
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
@@ -65,9 +62,7 @@ class AttendanceScreen extends StatelessWidget {
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(color: Color(0x42000000), blurRadius: 6),
|
||||
],
|
||||
shadows: [Shadow(color: Color(0x42000000), blurRadius: 6)],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -77,7 +72,9 @@ class AttendanceScreen extends StatelessWidget {
|
||||
/// MAIN CARD AREA
|
||||
/// ------------------------------
|
||||
Positioned(
|
||||
top: screenHeight * 0.2, // pushed down because of settings bar + greeting
|
||||
top:
|
||||
screenHeight *
|
||||
0.2, // pushed down because of settings bar + greeting
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
@@ -110,7 +107,7 @@ class AttendanceScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: screenHeight * 0.5,
|
||||
height: screenHeight * 0.5,
|
||||
width: screenWidth * 0.7,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x92757575),
|
||||
@@ -139,13 +136,12 @@ class AttendanceScreen extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
child: _FingerButton(
|
||||
icon: "assets/images/login.svg",
|
||||
icon: "assets/images/faceLogin.svg",
|
||||
label: "تسجيل الدخول",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => OvalCameraCapturePage(
|
||||
),
|
||||
builder: (_) => OvalCameraCapturePage(isLogin: true),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -180,15 +176,12 @@ class AttendanceScreen extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
child: _FingerButton(
|
||||
icon: "assets/images/logout.svg",
|
||||
icon: "assets/images/faceLogout.svg",
|
||||
label: "تسجيل خروج",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => LoginAnimationScreen(
|
||||
isLogin: false,
|
||||
isSuccess: true,
|
||||
),
|
||||
builder: (_) => OvalCameraCapturePage(isLogin: false),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -258,7 +251,7 @@ class _FingerButton extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(icon, width: 62, height: 62),
|
||||
SvgPicture.asset(icon, width: 75, height: 75),
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
label,
|
||||
|
||||
Reference in New Issue
Block a user