Change some ui in home

This commit is contained in:
hanie.khodkari
2025-05-06 17:02:02 +03:30
parent eb896054df
commit 75cd8e5c78
+43 -41
View File
@@ -24,6 +24,7 @@ import 'TestPages/test_verify_screen.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final userData = Provider.of<Auth>(context, listen: false).user;
return SafeArea(
child: Scaffold(
drawer: Selector<ConnectivityProvider, String>(
@@ -130,6 +131,48 @@ class HomePage extends StatelessWidget {
Divider(
height: 15,
),
SelectionItem(
firstLine: 'TEST RESULTS',
secondLine: 'List, Details & Add a one',
firstLineColor: Colors.black,
secondLineColor: Colors.grey,
backgroundColor: kLightGreyBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestResultScreen();
},
);
},
),
),
),
if (!userData['roles'].contains('User'))
SelectionItem(
firstLine: 'TEST TO VERIFY',
secondLine: 'Verify and reject Test Results',
firstLineColor: Colors.black,
secondLineColor: Colors.grey,
backgroundColor: kLightGreyBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestVerifyScreen();
},
);
},
),
),
),
Divider(
height: 15,
),
SelectionItem(
firstLine: 'ITEMS',
secondLine: 'List, Details & Add a one',
@@ -250,47 +293,6 @@ class HomePage extends StatelessWidget {
),
),
),
Divider(
height: 15,
),
SelectionItem(
firstLine: 'TEST RESULTS',
secondLine: 'List, Details & Add a one',
firstLineColor: Colors.black,
secondLineColor: Colors.grey,
backgroundColor: kLightGreyBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestResultScreen();
},
);
},
),
),
),
SelectionItem(
firstLine: 'TEST TO VERIFY',
secondLine: 'Verify and reject Test Results',
firstLineColor: Colors.black,
secondLineColor: Colors.grey,
backgroundColor: kLightGreyBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestVerifyScreen();
},
);
},
),
),
),
// Divider(height: 2),
SizedBox(
height: 5,