remove multi layer list with list of homeTile grids
This commit is contained in:
@@ -30,196 +30,346 @@ class HomeTileGrid extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeTileGridState extends State<HomeTileGrid> {
|
class _HomeTileGridState extends State<HomeTileGrid> {
|
||||||
late List<List<dynamic>> personalTileList = [];
|
late List<HomeTile> persHTList = [];
|
||||||
late List<List<dynamic>> businessTileList = [];
|
late List<HomeTile> busHTList = [];
|
||||||
late List<List<dynamic>> devTileList = [];
|
late List<List<HomeTile>> pbswitch;
|
||||||
late List<List<List<dynamic>>> pbswitch;
|
|
||||||
late bool businessUserSwitch;
|
late bool businessUserSwitch;
|
||||||
int _selectedIndex = 0;
|
int _selectedIndex = 0;
|
||||||
final baseAPI = AppEnviroment.baseApiUrl;
|
final baseAPI = AppEnviroment.baseApiUrl;
|
||||||
|
|
||||||
void setAppsNewPersonal(List<List<dynamic>> tileList) {
|
void setAppsNewPersonal(List<HomeTile> tileList) {
|
||||||
if (widget.signedInUser.fname == "") {
|
if (widget.signedInUser.fname == "") {
|
||||||
tileList.add(
|
tileList.add(HomeTile(
|
||||||
[
|
onTap: () {
|
||||||
Icons.perm_identity,
|
Navigator.of(context)
|
||||||
"Setup Profie",
|
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
() {
|
},
|
||||||
Navigator.of(context)
|
tileName: "Setup Profie",
|
||||||
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
tileIcon: Icons.perm_identity,
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
p: getPrim(),
|
||||||
// arguments: widget.userEmail);
|
s: getSec(),
|
||||||
}
|
));
|
||||||
],
|
// tileList.add(
|
||||||
);
|
// [
|
||||||
|
// home
|
||||||
|
// Icons.perm_identity,
|
||||||
|
// "Setup Profie",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAppsNewBusiness(List<List<dynamic>> tileList) {
|
void setAppsNewBusiness(List<HomeTile> tileList) {
|
||||||
tileList.add(
|
tileList.add(HomeTile(
|
||||||
[
|
onTap: () {
|
||||||
Icons.add_business_outlined,
|
Navigator.of(context).popAndPushNamed(
|
||||||
"Setup Business",
|
'/business/add',
|
||||||
() {
|
arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileName: "Setup Business",
|
||||||
|
tileIcon: Icons.add_business_outlined,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.add_business_outlined,
|
||||||
|
// "Setup Business",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context).popAndPushNamed(
|
||||||
|
// '/business/add',
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAppsPersonal(List<HomeTile> tileList) {
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).popAndPushNamed('/patient-profile',
|
||||||
|
arguments: PatientViewArguments(
|
||||||
|
widget.signedInUser, null, null, null, "personal"));
|
||||||
|
},
|
||||||
|
tileName: "Patient Profile",
|
||||||
|
tileIcon: Icons.medication,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).popAndPushNamed(
|
||||||
|
'/patient-access-review',
|
||||||
|
arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileName: "Access Review",
|
||||||
|
tileIcon: Icons.check_box_outlined,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.medication,
|
||||||
|
// "Patient Profile",
|
||||||
|
// () {
|
||||||
|
// //comeback here
|
||||||
|
// Navigator.of(context).popAndPushNamed('/patient-profile',
|
||||||
|
// arguments: PatientViewArguments(
|
||||||
|
// widget.signedInUser, null, null, null, "personal"));
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.check_box_outlined,
|
||||||
|
// "Access Review",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context).popAndPushNamed(
|
||||||
|
// '/patient-access-review',
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAppsBusiness(List<HomeTile> tileList) {
|
||||||
|
if (widget.businessUser!.access == "Full") {
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).popAndPushNamed(
|
||||||
|
'/business-profile',
|
||||||
|
arguments: BusinessArguments(
|
||||||
|
widget.signedInUser,
|
||||||
|
widget.businessUser,
|
||||||
|
widget.business,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileName: "Business Profile",
|
||||||
|
tileIcon: Icons.business,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.business,
|
||||||
|
// "Business Profile",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context).popAndPushNamed(
|
||||||
|
// '/business-profile',
|
||||||
|
// arguments: BusinessArguments(
|
||||||
|
// widget.signedInUser,
|
||||||
|
// widget.businessUser,
|
||||||
|
// widget.business,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
if (widget.business!.type == "Doctors Office") {
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).popAndPushNamed(
|
||||||
|
'/patient-manager',
|
||||||
|
arguments: BusinessArguments(
|
||||||
|
widget.signedInUser,
|
||||||
|
widget.businessUser,
|
||||||
|
widget.business,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileName: "Manage Patient",
|
||||||
|
tileIcon: Icons.medication,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.medication,
|
||||||
|
// "Manage Patient",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context).popAndPushNamed(
|
||||||
|
// '/patient-manager',
|
||||||
|
// arguments: BusinessArguments(
|
||||||
|
// widget.signedInUser,
|
||||||
|
// widget.businessUser,
|
||||||
|
// widget.business,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAppsDev(List<HomeTile> tileList) {
|
||||||
|
if (AppEnviroment.getEnv() == "Dev") {
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return const Mihloadingcircle();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileName: "Loading - Dev",
|
||||||
|
tileIcon: Icons.change_circle,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.change_circle,
|
||||||
|
// "Loading - Dev",
|
||||||
|
// () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return const Mihloadingcircle();
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).popAndPushNamed(
|
||||||
'/business/add',
|
'/business/add',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
],
|
tileName: "Setup Bus - Dev",
|
||||||
);
|
tileIcon: Icons.add_business_outlined,
|
||||||
}
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
void setAppsPersonal(List<List<dynamic>> tileList) {
|
));
|
||||||
tileList.add(
|
// tileList.add(
|
||||||
[
|
// [
|
||||||
Icons.medication,
|
// Icons.add_business_outlined,
|
||||||
"Patient Profile",
|
// "Setup Bus - Dev",
|
||||||
() {
|
// () {
|
||||||
//comeback here
|
// Navigator.of(context).popAndPushNamed(
|
||||||
Navigator.of(context).popAndPushNamed('/patient-profile',
|
// '/business/add',
|
||||||
arguments: PatientViewArguments(
|
// arguments: widget.signedInUser,
|
||||||
widget.signedInUser, null, null, null, "personal"));
|
// );
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
// }
|
||||||
// arguments: widget.userEmail);
|
// ],
|
||||||
}
|
// );
|
||||||
],
|
tileList.add(HomeTile(
|
||||||
);
|
onTap: () {
|
||||||
tileList.add(
|
|
||||||
[
|
|
||||||
Icons.check_box_outlined,
|
|
||||||
"Access Review",
|
|
||||||
() {
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
|
||||||
'/patient-access-review',
|
|
||||||
arguments: widget.signedInUser,
|
|
||||||
);
|
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
|
||||||
// arguments: widget.userEmail);
|
|
||||||
}
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAppsBusiness(List<List<dynamic>> tileList) {
|
|
||||||
if (widget.businessUser!.access == "Full") {
|
|
||||||
tileList.add(
|
|
||||||
[
|
|
||||||
Icons.business,
|
|
||||||
"Business Profile",
|
|
||||||
() {
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
|
||||||
'/business-profile',
|
|
||||||
arguments: BusinessArguments(
|
|
||||||
widget.signedInUser,
|
|
||||||
widget.businessUser,
|
|
||||||
widget.business,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
|
||||||
// arguments: widget.userEmail);
|
|
||||||
}
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (widget.business!.type == "Doctors Office") {
|
|
||||||
tileList.add(
|
|
||||||
[
|
|
||||||
Icons.medication,
|
|
||||||
"Manage Patient",
|
|
||||||
() {
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
|
||||||
'/patient-manager',
|
|
||||||
arguments: BusinessArguments(
|
|
||||||
widget.signedInUser,
|
|
||||||
widget.businessUser,
|
|
||||||
widget.business,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
|
||||||
// arguments: widget.userEmail);
|
|
||||||
}
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAppsDev(List<List<dynamic>> tileList) {
|
|
||||||
if (AppEnviroment.getEnv() == "Dev") {
|
|
||||||
tileList.add(
|
|
||||||
[
|
|
||||||
Icons.change_circle,
|
|
||||||
"Loading - Dev",
|
|
||||||
() {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return const Mihloadingcircle();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
],
|
|
||||||
);
|
|
||||||
tileList.add(
|
|
||||||
[
|
|
||||||
Icons.add_business_outlined,
|
|
||||||
"Setup Bus - Dev",
|
|
||||||
() {
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
|
||||||
'/business/add',
|
|
||||||
arguments: widget.signedInUser,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
],
|
|
||||||
);
|
|
||||||
tileList.add([
|
|
||||||
Icons.add_circle_outline,
|
|
||||||
"Add Pat - Dev",
|
|
||||||
() {
|
|
||||||
Navigator.of(context).popAndPushNamed('/patient-manager/add',
|
Navigator.of(context).popAndPushNamed('/patient-manager/add',
|
||||||
arguments: widget.signedInUser);
|
arguments: widget.signedInUser);
|
||||||
}
|
},
|
||||||
]);
|
tileName: "Add Pat - Dev",
|
||||||
tileList.add(
|
tileIcon: Icons.add_circle_outline,
|
||||||
[
|
p: getPrim(),
|
||||||
Icons.perm_identity,
|
s: getSec(),
|
||||||
"Upd Prof - Dev",
|
));
|
||||||
() {
|
// tileList.add([
|
||||||
Navigator.of(context)
|
// Icons.add_circle_outline,
|
||||||
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
// "Add Pat - Dev",
|
||||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
// () {
|
||||||
// arguments: widget.userEmail);
|
// Navigator.of(context).popAndPushNamed('/patient-manager/add',
|
||||||
}
|
// arguments: widget.signedInUser);
|
||||||
],
|
// }
|
||||||
);
|
// ]);
|
||||||
tileList.add([
|
tileList.add(HomeTile(
|
||||||
Icons.warning_amber_rounded,
|
onTap: () {
|
||||||
"Warn - Dev",
|
Navigator.of(context)
|
||||||
() {
|
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
|
},
|
||||||
|
tileName: "Upd Prof - Dev",
|
||||||
|
tileIcon: Icons.perm_identity,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add(
|
||||||
|
// [
|
||||||
|
// Icons.perm_identity,
|
||||||
|
// "Upd Prof - Dev",
|
||||||
|
// () {
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
|
// // Navigator.popAndPushNamed(context, '/patient-manager',
|
||||||
|
// // arguments: widget.userEmail);
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return const MIHWarningMessage(warningType: "No Access");
|
return const MIHWarningMessage(warningType: "No Access");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
]);
|
tileName: "Warn - Dev",
|
||||||
tileList.add([
|
tileIcon: Icons.warning_amber_rounded,
|
||||||
Icons.error_outline_outlined,
|
p: getPrim(),
|
||||||
"Error - Dev",
|
s: getSec(),
|
||||||
() {
|
));
|
||||||
|
// tileList.add([
|
||||||
|
// Icons.warning_amber_rounded,
|
||||||
|
// "Warn - Dev",
|
||||||
|
// () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return const MIHWarningMessage(warningType: "No Access");
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return const MIHErrorMessage(errorType: "Invalid Username");
|
return const MIHErrorMessage(errorType: "Invalid Username");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
]);
|
tileName: "Error - Dev",
|
||||||
tileList.add([
|
tileIcon: Icons.error_outline_outlined,
|
||||||
Icons.check_circle_outline_outlined,
|
p: getPrim(),
|
||||||
"Success - Dev",
|
s: getSec(),
|
||||||
() {
|
));
|
||||||
|
// tileList.add([
|
||||||
|
// Icons.error_outline_outlined,
|
||||||
|
// "Error - Dev",
|
||||||
|
// () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return const MIHErrorMessage(errorType: "Invalid Username");
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
@@ -229,50 +379,74 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
"Congratulations! Your account has been created successfully. You are log in and can start exploring.\n\nPlease note: more apps will appear once you update your profile.");
|
"Congratulations! Your account has been created successfully. You are log in and can start exploring.\n\nPlease note: more apps will appear once you update your profile.");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
]);
|
tileName: "Success - Dev",
|
||||||
tileList.add([
|
tileIcon: Icons.check_circle_outline_outlined,
|
||||||
Icons.delete_forever_outlined,
|
p: getPrim(),
|
||||||
"Delete - Dev",
|
s: getSec(),
|
||||||
() {
|
));
|
||||||
|
// tileList.add([
|
||||||
|
// Icons.check_circle_outline_outlined,
|
||||||
|
// "Success - Dev",
|
||||||
|
// () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return const MIHSuccessMessage(
|
||||||
|
// successType: "Success",
|
||||||
|
// successMessage:
|
||||||
|
// "Congratulations! Your account has been created successfully. You are log in and can start exploring.\n\nPlease note: more apps will appear once you update your profile.");
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
|
tileList.add(HomeTile(
|
||||||
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return MIHDeleteMessage(deleteType: "File", onTap: () {});
|
return MIHDeleteMessage(deleteType: "File", onTap: () {});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
]);
|
tileName: "Delete - Dev",
|
||||||
|
tileIcon: Icons.delete_forever_outlined,
|
||||||
|
p: getPrim(),
|
||||||
|
s: getSec(),
|
||||||
|
));
|
||||||
|
// tileList.add([
|
||||||
|
// Icons.delete_forever_outlined,
|
||||||
|
// "Delete - Dev",
|
||||||
|
// () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return MIHDeleteMessage(deleteType: "File", onTap: () {});
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<List<List<dynamic>>> setApps(List<List<dynamic>> personalTileList,
|
List<List<HomeTile>> setApps(
|
||||||
List<List<dynamic>> businessTileList) {
|
List<HomeTile> personalTileList, List<HomeTile> businessTileList) {
|
||||||
//print(widget.businessUser);
|
|
||||||
if (widget.signedInUser.fname == "") {
|
if (widget.signedInUser.fname == "") {
|
||||||
//print("New personal user");
|
|
||||||
setAppsNewPersonal(personalTileList);
|
setAppsNewPersonal(personalTileList);
|
||||||
} else if (widget.signedInUser.type == "personal") {
|
} else if (widget.signedInUser.type == "personal") {
|
||||||
//print("existing personal user");
|
|
||||||
setAppsPersonal(personalTileList);
|
setAppsPersonal(personalTileList);
|
||||||
} else if (widget.businessUser == null) {
|
} else if (widget.businessUser == null) {
|
||||||
//print("new business user");
|
|
||||||
setAppsPersonal(personalTileList);
|
setAppsPersonal(personalTileList);
|
||||||
setAppsNewBusiness(businessTileList);
|
setAppsNewBusiness(businessTileList);
|
||||||
} else {
|
} else {
|
||||||
//business
|
|
||||||
//print("existing business user");
|
|
||||||
setAppsPersonal(personalTileList);
|
setAppsPersonal(personalTileList);
|
||||||
setAppsBusiness(businessTileList);
|
setAppsBusiness(businessTileList);
|
||||||
}
|
}
|
||||||
if (AppEnviroment.getEnv() == "Dev") {
|
if (AppEnviroment.getEnv() == "Dev") {
|
||||||
//print("Dev Enviroment");
|
|
||||||
setAppsDev(personalTileList);
|
setAppsDev(personalTileList);
|
||||||
setAppsDev(businessTileList);
|
setAppsDev(businessTileList);
|
||||||
}
|
}
|
||||||
return [personalTileList, businessTileList];
|
return [personalTileList, businessTileList];
|
||||||
// pbswitch.add(personalTileList);
|
|
||||||
// pbswitch.add(businessTileList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Color getPrim() {
|
Color getPrim() {
|
||||||
@@ -321,8 +495,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
pbswitch = setApps(personalTileList, businessTileList);
|
setState(() {
|
||||||
businessUserSwitch = false;
|
pbswitch = setApps(persHTList, busHTList);
|
||||||
|
businessUserSwitch = false;
|
||||||
|
});
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,11 +552,8 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
itemCount: pbswitch[_selectedIndex].length,
|
itemCount: pbswitch[_selectedIndex].length,
|
||||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent: 200),
|
maxCrossAxisExtent: 200),
|
||||||
//const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
|
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
var tile = pbswitch[_selectedIndex][index];
|
return pbswitch[_selectedIndex][index];
|
||||||
//setState(() {});
|
|
||||||
return buildtile(tile);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user