improvements

main_design2.0
Sikander Saleem 2 years ago
parent 0a699fe33b
commit 4a8deafdde

@ -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();

@ -106,7 +106,7 @@ class _DashboardPageState extends State<DashboardPage> {
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,

Loading…
Cancel
Save