update setapp to send a widget to hometile
This commit is contained in:
@@ -49,14 +49,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.pushNamed('/user-profile', arguments: widget.signedInUser);
|
.pushNamed('/user-profile', arguments: widget.signedInUser);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/profile',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: widget.signedInUser,
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Setup Profie",
|
tileName: "Setup Profie",
|
||||||
tileIcon: Icons.perm_identity,
|
tileIcon: Icon(
|
||||||
|
Icons.perm_identity,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -70,39 +69,42 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
'/business-profile/set-up',
|
'/business-profile/set-up',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/business/add',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: widget.signedInUser,
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Setup Business",
|
tileName: "Setup Business",
|
||||||
tileIcon: Icons.add_business_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.add_business_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAppsPersonal(List<HomeTile> tileList) {
|
void setAppsPersonal(List<HomeTile> tileList) {
|
||||||
|
ImageProvider logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context)
|
||||||
|
.pushNamed('/user-profile', arguments: widget.signedInUser);
|
||||||
|
},
|
||||||
|
tileName: "Mzansi Profie",
|
||||||
|
tileIcon: Image(image: logo),
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed('/patient-profile',
|
Navigator.of(context).pushNamed('/patient-profile',
|
||||||
arguments: PatientViewArguments(
|
arguments: PatientViewArguments(
|
||||||
widget.signedInUser, null, null, null, "personal"));
|
widget.signedInUser, null, null, null, "personal"));
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/patient-profile',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: PatientViewArguments(
|
|
||||||
// widget.signedInUser,
|
|
||||||
// null,
|
|
||||||
// null,
|
|
||||||
// null,
|
|
||||||
// "personal",
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Patient Profile",
|
tileName: "Patient Profile",
|
||||||
tileIcon: Icons.medication,
|
tileIcon: Icon(
|
||||||
|
Icons.medication,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -112,14 +114,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
'/access-review',
|
'/access-review',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/patient-access-review',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: widget.signedInUser,
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Access Review",
|
tileName: "Access Review",
|
||||||
tileIcon: Icons.check_box_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.check_box_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -137,18 +138,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
widget.business,
|
widget.business,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/business-profile',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: BusinessArguments(
|
|
||||||
// widget.signedInUser,
|
|
||||||
// widget.businessUser,
|
|
||||||
// widget.business,
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Business Profile",
|
tileName: "Business Profile",
|
||||||
tileIcon: Icons.business,
|
tileIcon: Icon(
|
||||||
|
Icons.business,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -164,18 +160,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
widget.business,
|
widget.business,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/patient-manager',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: BusinessArguments(
|
|
||||||
// widget.signedInUser,
|
|
||||||
// widget.businessUser,
|
|
||||||
// widget.business,
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Manage Patient",
|
tileName: "Manage Patient",
|
||||||
tileIcon: Icons.medication,
|
tileIcon: Icon(
|
||||||
|
Icons.medication,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -194,7 +185,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Loading - Dev",
|
tileName: "Loading - Dev",
|
||||||
tileIcon: Icons.change_circle,
|
tileIcon: Icon(
|
||||||
|
Icons.change_circle,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -204,14 +199,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
'/business-profile/set-up',
|
'/business-profile/set-up',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/business/add',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: widget.signedInUser,
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Setup Bus - Dev",
|
tileName: "Setup Bus - Dev",
|
||||||
tileIcon: Icons.add_business_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.add_business_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -219,28 +213,29 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed('/patient-profile/set-up',
|
Navigator.of(context).pushNamed('/patient-profile/set-up',
|
||||||
arguments: widget.signedInUser);
|
arguments: widget.signedInUser);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
|
||||||
// '/patient-manager/add',
|
|
||||||
// (route) => false,
|
|
||||||
// arguments: widget.signedInUser,
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
tileName: "Add Pat - Dev",
|
tileName: "Add Pat - Dev",
|
||||||
tileIcon: Icons.add_circle_outline,
|
tileIcon: Icon(
|
||||||
|
Icons.add_circle_outline,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Navigator.of(context)
|
|
||||||
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/user-profile',
|
'/user-profile',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Upd Prof - Dev",
|
tileName: "Upd Prof - Dev",
|
||||||
tileIcon: Icons.perm_identity,
|
tileIcon: Icon(
|
||||||
|
Icons.perm_identity,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -254,7 +249,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Warn - Dev",
|
tileName: "Warn - Dev",
|
||||||
tileIcon: Icons.warning_amber_rounded,
|
tileIcon: Icon(
|
||||||
|
Icons.warning_amber_rounded,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -268,7 +267,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Error - Dev",
|
tileName: "Error - Dev",
|
||||||
tileIcon: Icons.error_outline_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.error_outline_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -285,7 +288,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Success - Dev",
|
tileName: "Success - Dev",
|
||||||
tileIcon: Icons.check_circle_outline_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.check_circle_outline_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -300,7 +307,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Delete - Dev",
|
tileName: "Delete - Dev",
|
||||||
tileIcon: Icons.delete_forever_outlined,
|
tileIcon: Icon(
|
||||||
|
Icons.delete_forever_outlined,
|
||||||
|
color: getSec(),
|
||||||
|
size: 200,
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
@@ -458,7 +469,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
itemCount:
|
itemCount:
|
||||||
searchApp(pbswitch[_selectedIndex], appSearch).length,
|
searchApp(pbswitch[_selectedIndex], appSearch).length,
|
||||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent: 200),
|
mainAxisSpacing: 10, maxCrossAxisExtent: 200),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return searchApp(
|
return searchApp(
|
||||||
pbswitch[_selectedIndex], appSearch)[index];
|
pbswitch[_selectedIndex], appSearch)[index];
|
||||||
|
|||||||
Reference in New Issue
Block a user