Arrange the tiles of home and dashboard

This commit is contained in:
hanie.khodkari
2025-03-16 18:08:13 +03:30
parent 7dbe9e295e
commit 46dbd464ba
2 changed files with 143 additions and 65 deletions
+52 -53
View File
@@ -146,22 +146,41 @@ class HomePage extends StatelessWidget {
),
),
),
Divider(
height: 2,
),
SelectionItem(
firstLine: 'LABELS',
secondLine: 'List, Details & Add a one',
firstLineColor: kLightBlue,
secondLineColor: kLightBlueSub,
backgroundColor: kLightBlueBackground,
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 LabelResultScreen();
return TestVerifyScreen();
},
);
},
),
),
),
Divider(
height: 2,
),
SelectionItem(
firstLine: 'ITEMS',
secondLine: 'List, Details & Add a one',
firstLineColor: kBlue,
secondLineColor: kBlueSub,
backgroundColor: kBlueBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return ItemResultScreen();
},
);
},
@@ -169,18 +188,18 @@ class HomePage extends StatelessWidget {
),
),
SelectionItem(
firstLine: 'CYCLES',
secondLine: 'List, Details & Add a one',
firstLineColor: kPink,
secondLineColor: kPinkSub,
backgroundColor: kPinkBackground,
firstLine: 'MY ITEMS',
secondLine: 'The Items that i possess',
firstLineColor: kDarkBlue,
secondLineColor: kDarkBlueSub,
backgroundColor: kDarkBlueBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return CycleResultScreen();
return MyItemsResultScreen();
},
);
},
@@ -232,18 +251,18 @@ class HomePage extends StatelessWidget {
height: 2,
),
SelectionItem(
firstLine: 'ITEMS',
firstLine: 'LABELS',
secondLine: 'List, Details & Add a one',
firstLineColor: kBlue,
secondLineColor: kBlueSub,
backgroundColor: kBlueBackground,
firstLineColor: kLightBlue,
secondLineColor: kLightBlueSub,
backgroundColor: kLightBlueBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return ItemResultScreen();
return LabelResultScreen();
},
);
},
@@ -251,18 +270,18 @@ class HomePage extends StatelessWidget {
),
),
SelectionItem(
firstLine: 'MY ITEMS',
secondLine: 'The Items that i possess',
firstLineColor: kDarkBlue,
secondLineColor: kDarkBlueSub,
backgroundColor: kDarkBlueBackground,
firstLine: 'CYCLES',
secondLine: 'List, Details & Add a one',
firstLineColor: kPink,
secondLineColor: kPinkSub,
backgroundColor: kPinkBackground,
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return MyItemsResultScreen();
return CycleResultScreen();
},
);
},
@@ -270,25 +289,6 @@ class HomePage extends StatelessWidget {
),
),
Divider(height: 2),
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();
},
);
},
),
),
),
BarcodeSelectionItem(),
],
),
@@ -331,14 +331,13 @@ class SelectionItem extends StatelessWidget {
final Color? backgroundColor;
final VoidCallback? onTap;
SelectionItem({
this.firstLine,
this.secondLine,
this.onTap,
this.firstLineColor,
this.secondLineColor,
this.backgroundColor
});
SelectionItem(
{this.firstLine,
this.secondLine,
this.onTap,
this.firstLineColor,
this.secondLineColor,
this.backgroundColor});
@override
Widget build(BuildContext context) {