|
|
|
|
@ -107,15 +107,15 @@ class _DashboardViewState extends State<DashboardView> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
bool isNurse = (Provider.of<UserProvider>(context, listen: false).user!.type) == UsersTypes.normal_user;
|
|
|
|
|
final user = Provider.of<UserProvider>(context, listen: false).user;
|
|
|
|
|
return Scaffold(
|
|
|
|
|
return Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Scaffold(
|
|
|
|
|
appBar: PreferredSize(
|
|
|
|
|
preferredSize: const Size.fromHeight(kToolbarHeight),
|
|
|
|
|
child: AppBarWidget(
|
|
|
|
|
onDrawerPress: widget.onDrawerPress,
|
|
|
|
|
)),
|
|
|
|
|
body: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
RefreshIndicator(
|
|
|
|
|
body: RefreshIndicator(
|
|
|
|
|
onRefresh: () async {
|
|
|
|
|
getRequests();
|
|
|
|
|
return Future.delayed(const Duration(milliseconds: 250));
|
|
|
|
|
@ -133,11 +133,10 @@ class _DashboardViewState extends State<DashboardView> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
//TODO need to fix the alignment when no data is found
|
|
|
|
|
),
|
|
|
|
|
if (user!=null&&user.employeeIsHMG==false)
|
|
|
|
|
Positioned(
|
|
|
|
|
right: user.type == UsersTypes.engineer ? 20.toScreenWidth : null,
|
|
|
|
|
left: user.type != UsersTypes.engineer ? 20.toScreenWidth : null,
|
|
|
|
|
right: 20.toScreenWidth ,
|
|
|
|
|
bottom: 20.toScreenHeight,
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
@ -173,7 +172,6 @@ class _DashboardViewState extends State<DashboardView> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|