role name added

main_production
Sikander Saleem 1 day ago
parent 6ad8471e9b
commit 072953a3a7

@ -145,7 +145,7 @@ class _AppBarWidgetState extends State<AppBarWidget> with TickerProviderStateMix
style: AppTextStyles.heading6.copyWith(color: AppColor.headingTextColor(context), fontSize: context.isTablet() ? 14 : null),
),
Text(
snapshot.user?.type?.name.toCamelCase ?? "",
snapshot.user?.roleName ?? "",
style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context), fontSize: context.isTablet() ? 12 : null),
),
],

@ -100,6 +100,8 @@ class User {
return {"username": userName, "password": password, "fireBaseToken": FirebaseNotificationManger?.token ?? "", "notificationType": notificationType};
}
String get roleName => userRoles?.first.name ?? "";
UsersTypes? get type {
switch (userRoles?.first.value) {
case "R-6":

Loading…
Cancel
Save