diff --git a/lib/new_views/common_widgets/app_drawer.dart b/lib/new_views/common_widgets/app_drawer.dart index 392f14f0..43c10efc 100644 --- a/lib/new_views/common_widgets/app_drawer.dart +++ b/lib/new_views/common_widgets/app_drawer.dart @@ -57,7 +57,7 @@ class AppDrawer extends StatelessWidget { ], ), 8.height, - userProvider.user.username.heading3(context).custom(fontWeight: FontWeight.w600), + (userProvider.user?.username ?? "").heading3(context).custom(fontWeight: FontWeight.w600), if ((userProvider.user?.email ?? "").isNotEmpty) (userProvider.user?.email).heading6(context).custom(color: context.isDark ? AppColor.neutral10 : AppColor.neutral20), 18.height, 1.divider, @@ -91,7 +91,7 @@ class AppDrawer extends StatelessWidget { context: context, builder: (_) => AAlertDialog(title: context.translation.signOut, content: context.translation.logoutAlert), ); - if (result) { + if (result ?? false) { settingProvider.resetSettings(); userProvider.reset(); Navigator.of(context).pop(); diff --git a/lib/new_views/pages/land_page/dashboard_page.dart b/lib/new_views/pages/land_page/dashboard_page.dart index e8359f08..efa27cce 100644 --- a/lib/new_views/pages/land_page/dashboard_page.dart +++ b/lib/new_views/pages/land_page/dashboard_page.dart @@ -106,7 +106,7 @@ class _DashboardPageState extends State { style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral20), ), Text( - user.username ?? "Eng Mahmoud", + user?.username ?? "", style: AppTextStyles.heading2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50, fontWeight: FontWeight.w600), ), 24.height,