feat: Align app bar elements and adjust padding in attendance and employee screens

This commit is contained in:
Vaibhav Surve 2025-06-12 22:51:44 +05:30
parent 8e47d28005
commit c7600e8e26
4 changed files with 52 additions and 32 deletions

View File

@ -76,15 +76,19 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
elevation: 0.5, elevation: 0.5,
foregroundColor: Colors.black, foregroundColor: Colors.black,
titleSpacing: 0, titleSpacing: 0,
leading: IconButton( centerTitle: false,
icon: const Icon(Icons.arrow_back_ios_new, leading: Padding(
color: Colors.black, size: 20), padding: const EdgeInsets.only(top: 15.0), // Aligns with title
onPressed: () { child: IconButton(
Get.offNamed('/dashboard'); icon: const Icon(Icons.arrow_back_ios_new,
}, color: Colors.black, size: 20),
onPressed: () {
Get.offNamed('/dashboard');
},
),
), ),
title: Padding( title: Padding(
padding: const EdgeInsets.only(top: 12.0), padding: const EdgeInsets.only(top: 15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -94,7 +98,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
fontWeight: 700, fontWeight: 700,
color: Colors.black, color: Colors.black,
), ),
const SizedBox(height: 4), const SizedBox(height: 2),
GetBuilder<ProjectController>( GetBuilder<ProjectController>(
builder: (projectController) { builder: (projectController) {
final projectName = final projectName =

View File

@ -73,21 +73,26 @@ class _EmployeesScreenState extends State<EmployeesScreen> with UIMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: const Color(0xFFF5F5F5), backgroundColor: const Color(0xFFF5F5F5),
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: const Size.fromHeight(80), preferredSize: const Size.fromHeight(80),
child: AppBar( child: AppBar(
backgroundColor: const Color(0xFFF5F5F5), backgroundColor: const Color(0xFFF5F5F5),
elevation: 0.5, elevation: 0.5,
foregroundColor: Colors.black, foregroundColor: Colors.black,
titleSpacing: 0, titleSpacing: 0,
leading: IconButton( centerTitle: false,
icon: const Icon(Icons.arrow_back_ios_new), leading: Padding(
onPressed: () { padding: const EdgeInsets.only(top: 15.0), // Aligns with title
Get.offNamed('/dashboard'); child: IconButton(
}, icon: const Icon(Icons.arrow_back_ios_new,
color: Colors.black, size: 20),
onPressed: () {
Get.offNamed('/dashboard');
},
),
), ),
title: Padding( title: Padding(
padding: const EdgeInsets.only(top: 12.0), padding: const EdgeInsets.only(top: 15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -97,7 +102,7 @@ class _EmployeesScreenState extends State<EmployeesScreen> with UIMixin {
fontWeight: 700, fontWeight: 700,
color: Colors.black, color: Colors.black,
), ),
const SizedBox(height: 4), const SizedBox(height: 2),
GetBuilder<ProjectController>( GetBuilder<ProjectController>(
builder: (projectController) { builder: (projectController) {
final projectName = final projectName =

View File

@ -72,30 +72,36 @@ class _DailyProgressReportScreenState extends State<DailyProgressReportScreen>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: const Size.fromHeight(80), preferredSize: const Size.fromHeight(80),
child: AppBar( child: AppBar(
backgroundColor: const Color(0xFFF5F5F5), backgroundColor: const Color(0xFFF5F5F5),
elevation: 0.5, elevation: 0.5,
foregroundColor: Colors.black, foregroundColor: Colors.black,
titleSpacing: 0, titleSpacing: 0,
leading: IconButton( centerTitle: false,
icon: const Icon(Icons.arrow_back_ios_new), leading: Padding(
onPressed: () { padding: const EdgeInsets.only(top: 15.0), // Aligns with title
Get.offNamed('/dashboard'); child: IconButton(
}, icon: const Icon(Icons.arrow_back_ios_new,
color: Colors.black, size: 20),
onPressed: () {
Get.offNamed('/dashboard');
},
),
), ),
title: Padding( title: Padding(
padding: const EdgeInsets.only(top: 12.0), padding: const EdgeInsets.only(top: 15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
MyText.titleLarge( MyText.titleLarge(
'Daily Task Progress Report', 'Daily Task Progress',
fontWeight: 700, fontWeight: 700,
color: Colors.black, color: Colors.black,
), ),
const SizedBox(height: 4), const SizedBox(height: 2),
GetBuilder<ProjectController>( GetBuilder<ProjectController>(
builder: (projectController) { builder: (projectController) {
final projectName = final projectName =

View File

@ -61,14 +61,19 @@ class _DailyTaskPlaningScreenState extends State<DailyTaskPlaningScreen>
elevation: 0.5, elevation: 0.5,
foregroundColor: Colors.black, foregroundColor: Colors.black,
titleSpacing: 0, titleSpacing: 0,
leading: IconButton( centerTitle: false,
icon: const Icon(Icons.arrow_back_ios_new), leading: Padding(
onPressed: () { padding: const EdgeInsets.only(top: 15.0), // Aligns with title
Get.offNamed('/dashboard'); child: IconButton(
}, icon: const Icon(Icons.arrow_back_ios_new,
color: Colors.black, size: 20),
onPressed: () {
Get.offNamed('/dashboard');
},
),
), ),
title: Padding( title: Padding(
padding: const EdgeInsets.only(top: 12.0), padding: const EdgeInsets.only(top: 15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -78,7 +83,7 @@ class _DailyTaskPlaningScreenState extends State<DailyTaskPlaningScreen>
fontWeight: 700, fontWeight: 700,
color: Colors.black, color: Colors.black,
), ),
const SizedBox(height: 4), const SizedBox(height: 2),
GetBuilder<ProjectController>( GetBuilder<ProjectController>(
builder: (projectController) { builder: (projectController) {
final projectName = final projectName =