This commit is contained in:
@ -28,11 +28,11 @@ class EndDrawer extends StatelessWidget {
|
||||
children: [
|
||||
Obx(() {
|
||||
if (authController.token.value != null &&
|
||||
authController.avatarUrl.value != null) {
|
||||
authController.user.value?.avatarUrl != null) {
|
||||
return DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(authController.avatarUrl.value!),
|
||||
image: NetworkImage(authController.user.value!.avatarUrl!),
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.topCenter,
|
||||
),
|
||||
@ -58,11 +58,11 @@ class EndDrawer extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
if (authController.username.value != null)
|
||||
if (authController.user.value?.username != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Text(
|
||||
'Hamlo ${authController.username.value!}',
|
||||
'Hamlo ${authController.user.value?.username}',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user