Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
38d17dba
Commit
38d17dba
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
ios pub
parent
45a85185
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/screens/AttendanceScreen.dart
View file @
38d17dba
...
...
@@ -91,7 +91,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
// prevMonthName == currentMonthName
// ? '$currentMonthName $year'
// : '$prevMonthName - $currentMonthName $year';
final
monthLabel
=
'
$currentMonthName
$year
'
;
final
monthLabel
=
'
$currentMonthName
$year
'
;
return
RefreshIndicator
.
adaptive
(
color:
AppColors
.
app_blue
,
...
...
@@ -106,585 +106,611 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Attendance"
),
body:
SafeArea
(
child:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
left:
15
,
right:
10
,
top:
15
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
"Check-in"
)),
Expanded
(
child:
Text
(
"Check-out"
)),
],
),
body:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
left:
15
,
right:
10
,
top:
15
,
),
SizedBox
(
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
"Check-in"
)),
Expanded
(
child:
Text
(
"Check-out"
)),
],
),
),
SizedBox
(
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime
,
style:
TextStyle
(
color:
formattedTime
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime
,
style:
TextStyle
(
color:
formattedTime
!=
"-"
?
Color
(
0xFF493272
,
)
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
TextSpan
(
text:
period
,
style:
TextStyle
(
color:
period
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
period
,
style:
TextStyle
(
color:
period
!=
"-"
?
Color
(
0xFF493272
,
)
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
),
]
,
)
,
)
,
]
,
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_in_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_in_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
]
,
)
,
)
,
]
,
),
),
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertic
al:
1
5
,
)
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertic
al:
1
5
,
)
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
)
,
),
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizont
al:
1
0
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizont
al:
1
0
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime2
,
style:
TextStyle
(
color:
formattedTime2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime2
,
style:
TextStyle
(
color:
formattedTime2
!=
"-"
?
Color
(
0xFF493272
,
)
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
TextSpan
(
text:
period2
,
style:
TextStyle
(
color:
period2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
period2
,
style:
TextStyle
(
color:
period2
!=
"-"
?
Color
(
0xFF493272
,
)
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
),
]
,
)
,
)
,
]
,
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_out_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_out_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
]
,
)
,
)
,
]
,
),
),
]
,
)
,
)
,
]
,
),
],
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Text
(
"Attendance Details"
,
style:
TextStyle
(
fontFamily:
"JakartaSemiBold"
,
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
)
,
]
,
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Text
(
"Attendance Details"
,
style:
TextStyle
(
fontFamily:
"JakartaSemiBold"
,
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
child:
GridView
.
builder
(
itemCount:
4
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
20
/
10
,
),
itemBuilder:
(
context
,
index
)
{
final
numbers
=
[
attendance
.
presentDays
,
attendance
.
absentDays
,
attendance
.
holidays
,
attendance
.
latePenalties
,
];
final
names
=
[
"Present Days"
,
"Absent Days"
,
"Holidays"
,
"Late Points"
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFFFEFEF
,
0xFFF3EDFF
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFFFF0000
,
0xFF493272
,
0xFF91481B
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
index
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
numbers
[
index
].
toString
(),
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
index
]),
),
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
GridView
.
builder
(
itemCount:
4
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
20
/
10
,
),
itemBuilder:
(
context
,
index
)
{
final
numbers
=
[
attendance
.
presentDays
,
attendance
.
absentDays
,
attendance
.
holidays
,
attendance
.
latePenalties
,
];
final
names
=
[
"Present Days"
,
"Absent Days"
,
"Holidays"
,
"Late Points"
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFFFEFEF
,
0xFFF3EDFF
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFFFF0000
,
0xFF493272
,
0xFF91481B
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
index
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
numbers
[
index
].
toString
(),
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
index
]),
),
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
]
,
)
,
)
;
},
)
,
)
,
]
,
)
,
);
}
,
),
),
///calendar
Container
(
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
child:
Column
(
children:
[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
10
,
30
,
0
,
),
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
SizedBox
(
child:
Row
(
children:
[
GestureDetector
(
onTap:
()
{
attendance
.
setPreviousMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_left.svg"
,
),
///calendar
Container
(
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
child:
Column
(
children:
[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
10
,
30
,
0
,
),
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
SizedBox
(
child:
Row
(
children:
[
GestureDetector
(
onTap:
()
{
attendance
.
setPreviousMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_left.svg"
,
),
Text
(
monthLabel
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
)
,
),
),
Text
(
monthLabel
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
),
),
GestureDetector
(
onTap:
()
{
attendance
.
setNextMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
)
,
),
GestureDetector
(
onTap:
()
{
attendance
.
setNextMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
]
,
)
,
)
,
]
,
),
),
InkResponse
(
onTap:
()
{
_showInfoBottomSheet
(
context
);
},
child:
SizedBox
(
InkResponse
(
onTap:
()
{
_showInfoBottomSheet
(
context
);
},
child:
SizedBox
(
width:
20
,
height:
20
,
child:
SvgPicture
.
asset
(
"assets/svg/ic_info_new.svg"
,
width:
20
,
height:
20
,
child:
SvgPicture
.
asset
(
"assets/svg/ic_info_new.svg"
,
width:
20
,
height:
20
,
),
),
),
]
,
)
,
)
,
]
,
),
),
SizedBox
(
height:
5
),
Padding
(
p
adding
:
const
EdgeInsets
.
fromLTRB
(
8
,
10
,
8
,
0
),
child
:
C
on
tainer
(
child:
Row
(
child
ren:
[
for
(
var
i
=
0
;
i
<
[
'S'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S
'
,
].
length
;
i
++
)
Expanded
(
child:
Text
(
[
'S'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S
'
,
][
i
]
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
color:
i
==
0
?
Color
(
0xFFFF0000
)
:
AppColors
.
semi_black
,
)
,
),
SizedBox
(
height:
5
),
P
adding
(
padding
:
c
on
st
EdgeInsets
.
fromLTRB
(
8
,
10
,
8
,
0
),
child:
Container
(
child
:
Row
(
children:
[
for
(
var
i
=
0
;
i
<
[
'S
'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S'
,
].
length
;
i
++
)
Expanded
(
child:
Text
(
[
'S
'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S'
,
][
i
]
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
color:
i
==
0
?
Color
(
0xFFFF0000
)
:
AppColors
.
semi_black
,
),
),
]
,
)
,
)
,
]
,
),
),
),
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
10
),
child:
Container
(
child:
GridView
.
builder
(
itemCount:
daysInPeriod
+
startingIndex
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
7
,
crossAxisSpacing:
2
,
mainAxisSpacing:
1
,
childAspectRatio:
(
255
/
245
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
,
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
index
<
startingIndex
)
{
return
SizedBox
.
shrink
();
}
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
10
),
child:
Container
(
child:
GridView
.
builder
(
itemCount:
daysInPeriod
+
startingIndex
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
7
,
crossAxisSpacing:
2
,
mainAxisSpacing:
1
,
childAspectRatio:
(
255
/
245
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
,
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
index
<
startingIndex
)
{
return
SizedBox
.
shrink
();
}
final
dayIndex
=
index
-
startingIndex
;
final
currentDateInPeriod
=
startDate
.
add
(
Duration
(
days:
dayIndex
),
);
final
currentDay
=
currentDateInPeriod
.
day
;
final
isFutureDate
=
currentDateInPeriod
.
isAfter
(
currentDate
);
final
dayIndex
=
index
-
startingIndex
;
final
currentDateInPeriod
=
startDate
.
add
(
Duration
(
days:
dayIndex
),
);
final
currentDay
=
currentDateInPeriod
.
day
;
final
isFutureDate
=
currentDateInPeriod
.
isAfter
(
currentDate
);
// Find matching date in dateArrayList
Map
<
String
,
dynamic
>?
dateMap
;
try
{
dateMap
=
dateArrayList
[
dayIndex
];
}
catch
(
e
)
{
dateMap
=
{};
}
// Find matching date in dateArrayList
Map
<
String
,
dynamic
>?
dateMap
;
try
{
dateMap
=
dateArrayList
[
dayIndex
];
}
catch
(
e
)
{
dateMap
=
{};
}
// Find matching penalty
Map
<
String
,
dynamic
>?
penaltyMap
;
try
{
penaltyMap
=
penalityArrayList
[
dayIndex
];
}
catch
(
e
)
{
penaltyMap
=
{};
}
// Find matching penalty
Map
<
String
,
dynamic
>?
penaltyMap
;
try
{
penaltyMap
=
penalityArrayList
[
dayIndex
];
}
catch
(
e
)
{
penaltyMap
=
{};
}
String
?
dateColor
=
dateMap
.
isNotEmpty
?
dateMap
.
values
.
first
:
null
;
String
?
penaltyKey
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
keys
.
first
:
null
;
int
?
datePenalty
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
values
.
first
:
0
;
String
?
dateColor
=
dateMap
.
isNotEmpty
?
dateMap
.
values
.
first
:
null
;
String
?
penaltyKey
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
keys
.
first
:
null
;
int
?
datePenalty
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
values
.
first
:
0
;
// Determine if this is the current day
final
isCurrentDay
=
currentDateInPeriod
.
day
==
currentDate
.
day
&&
currentDateInPeriod
.
month
==
currentDate
.
month
&&
currentDateInPeriod
.
year
==
currentDate
.
year
;
// Determine if this is the current day
final
isCurrentDay
=
currentDateInPeriod
.
day
==
currentDate
.
day
&&
currentDateInPeriod
.
month
==
currentDate
.
month
&&
currentDateInPeriod
.
year
==
currentDate
.
year
;
return
InkWell
(
onTap:
isFutureDate
?
null
:
()
{
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
attendance
.
dateWiseAttendance
(
homeProvider
,
penaltyKey
,
context
,
);
}
attendance
.
selectedDate
=
currentDay
.
toString
();
_showAttDetailsBottomSheet
(
context
,
);
},
child:
Card
(
elevation:
0
,
child:
Column
(
children:
[
// Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Text(
// "($datePenalty)",
// style: TextStyle(
// fontWeight: FontWeight.w400,
// color: Colors.black,
// fontSize: 5
// ),
// ),
// ],
// ),
Center
(
child:
Container
(
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
border:
Border
.
all
(
color:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF1487C9
,
)
:
Colors
.
transparent
,
),
return
InkWell
(
onTap:
isFutureDate
?
null
:
()
{
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
attendance
.
dateWiseAttendance
(
homeProvider
,
penaltyKey
,
context
,
);
}
attendance
.
selectedDate
=
currentDay
.
toString
();
_showAttDetailsBottomSheet
(
context
,
);
},
child:
Card
(
elevation:
0
,
child:
Column
(
children:
[
// Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Text(
// "($datePenalty)",
// style: TextStyle(
// fontWeight: FontWeight.w400,
// color: Colors.black,
// fontSize: 5
// ),
// ),
// ],
// ),
Center
(
child:
Container
(
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
border:
Border
.
all
(
color:
isFutureDate
?
Colors
.
transparent
:
(
isCurrentDay
||
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFFFFFFFF
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
).
withAlpha
(
50
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
).
withAlpha
(
50
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
).
withAlpha
(
50
)
:
dateColor
==
'br'
?
Color
(
0xFFFFE8D0
)
:
dateColor
==
'y'
?
Color
(
0xFFFFF9B2
)
0xFF1487C9
,
)
:
Colors
.
transparent
,
),
child:
Center
(
child:
Text
(
currentDay
.
toString
(),
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
isFutureDate
?
AppColors
.
semi_black
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF2D2D2D
,
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
)
:
dateColor
==
'br'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'y'
?
Color
(
0xFF605C00
,
)
:
Colors
.
transparent
,
),
color:
isFutureDate
?
Colors
.
transparent
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFFFFFFFF
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
).
withAlpha
(
50
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
).
withAlpha
(
50
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
).
withAlpha
(
50
)
:
dateColor
==
'br'
?
Color
(
0xFFFFE8D0
)
:
dateColor
==
'y'
?
Color
(
0xFFFFF9B2
)
:
Colors
.
transparent
,
),
child:
Center
(
child:
Text
(
currentDay
.
toString
(),
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
isFutureDate
?
AppColors
.
semi_black
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF2D2D2D
,
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
)
:
dateColor
==
'br'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'y'
?
Color
(
0xFF605C00
,
)
:
Colors
.
transparent
,
),
),
),
),
]
,
)
,
)
,
]
,
),
)
;
},
)
,
)
,
);
}
,
),
),
]
,
)
,
)
,
]
,
),
SizedBox
(
height:
70
),
]
,
)
,
),
SizedBox
(
height:
70
)
,
]
,
),
),
),
...
...
@@ -704,7 +730,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
attendance
.
attendanceStatus
,
),
),
);
if
(
res
==
true
)
{
attendance
.
getAttendanceList
(
...
...
@@ -839,7 +864,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
width:
18
,
height:
18
,
...
...
@@ -860,11 +885,11 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
),
SizedBox
(
width:
5
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
text
[
index
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
black
,
...
...
lib/screens/HomeScreen.dart
View file @
38d17dba
...
...
@@ -166,7 +166,7 @@ class _MyHomePageState extends State<MyHomePage> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
...
...
@@ -191,10 +191,7 @@ class _MyHomePageState extends State<MyHomePage> {
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
15
,
),
padding:
EdgeInsets
.
only
(
bottom:
15
,
right:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
30
),
gradient:
LinearGradient
(
...
...
@@ -271,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
),
Expanded
(
flex:
3
,
child:
SizedBox
(
child:
Container
(
padding:
EdgeInsets
.
only
(
right:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -291,9 +289,10 @@ class _MyHomePageState extends State<MyHomePage> {
'
${profile.employeeName}
'
,
maxFontSize:
18
,
minFontSize:
12
,
style:
TextStyle
(
fontSize:
18
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
style:
TextStyle
(
fontSize:
18
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
2
,
),
...
...
@@ -301,9 +300,10 @@ class _MyHomePageState extends State<MyHomePage> {
'(
${profile.designation}
)'
,
maxFontSize:
14
,
minFontSize:
10
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
1
,
),
...
...
@@ -394,7 +394,9 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute
(
builder:
(
context
)
=>
AttendanceScreen
(),
settings:
RouteSettings
(
arguments:
'AttendanceScreen'
),
settings:
RouteSettings
(
arguments:
'AttendanceScreen'
,
),
),
);
break
;
...
...
@@ -436,7 +438,9 @@ class _MyHomePageState extends State<MyHomePage> {
builder:
(
context
)
=>
Gentrackerdashboard
(),
settings:
RouteSettings
(
arguments:
'Gentrackerdashboard'
),
settings:
RouteSettings
(
arguments:
'Gentrackerdashboard'
,
),
),
);
break
;
...
...
@@ -498,16 +502,15 @@ class _MyHomePageState extends State<MyHomePage> {
);
break
;
case
"Finance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Financedashboard
(),
settings:
RouteSettings
(
arguments:
'Financedashboard'
),
settings:
RouteSettings
(
arguments:
'Financedashboard'
,
),
),
);
break
;
case
"Orders"
:
...
...
@@ -525,7 +528,9 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute
(
builder:
(
context
)
=>
CrmdashboardScreen
(),
settings:
RouteSettings
(
name:
'CrmdashboardScreen'
)
settings:
RouteSettings
(
name:
'CrmdashboardScreen'
,
),
),
);
default
:
...
...
@@ -591,7 +596,9 @@ class _MyHomePageState extends State<MyHomePage> {
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
Consumer3
<
HomescreenNotifier
,
ProfileNotifer
,
...
...
@@ -637,7 +644,10 @@ class _MyHomePageState extends State<MyHomePage> {
),
SizedBox
(
height:
15
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
30
),
gradient:
LinearGradient
(
...
...
@@ -845,7 +855,9 @@ class _MyHomePageState extends State<MyHomePage> {
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
Consumer3
<
HomescreenNotifier
,
ProfileNotifer
,
...
...
pubspec.lock
View file @
38d17dba
...
...
@@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.1
2
.0"
version: "2.1
3
.0"
auto_size_text:
dependency: "direct main"
description:
...
...
@@ -293,10 +293,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
url: "https://pub.dev"
source: hosted
version: "1.3.
2
"
version: "1.3.
3
"
ffi:
dependency: transitive
description:
...
...
@@ -940,26 +940,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev"
source: hosted
version: "1
0
.0.
8
"
version: "1
1
.0.
1
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.
9
"
version: "3.0.
10
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
url: "https://pub.dev"
source: hosted
version: "3.0.
1
"
version: "3.0.
2
"
lints:
dependency: transitive
description:
...
...
@@ -1665,10 +1665,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "1
4.3.1
"
version: "1
5.0.0
"
web:
dependency: transitive
description:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment