Added some styling to the profile picture

This commit is contained in:
Alex
2023-02-12 13:34:20 -06:00
parent 6a7a4f98db
commit 0538f4478b
2 changed files with 18 additions and 9 deletions
@@ -51,10 +51,15 @@ class HomePageAppBar extends ConsumerWidget with PreferredSizeWidget {
Scaffold.of(context).openDrawer();
},
child: CircleAvatar(
backgroundColor: Theme.of(context).primaryColor,
radius: 18,
child: CircleAvatar(
backgroundColor: Theme.of(context).primaryColor.withOpacity(0.1),
backgroundImage: CachedNetworkImageProvider(
'$endpoint/user/profile-image/${authState.userId}',
),
radius: 18,
radius: 17,
),
),
);
}
@@ -37,15 +37,19 @@ class ProfileDrawerHeader extends HookConsumerWidget {
if (uploadProfileImageStatus == UploadProfileStatus.idle) {
if (authState.profileImagePath.isNotEmpty) {
return CircleAvatar(
backgroundColor: Theme.of(context).primaryColor,
radius: 35,
child: CircleAvatar(
radius: 34,
backgroundImage: NetworkImage(
'$endpoint/user/profile-image/${authState.userId}?d=${dummy++}',
),
backgroundColor: Colors.transparent,
),
);
} else {
return const CircleAvatar(
radius: 35,
radius: 33,
backgroundImage: AssetImage('assets/immich-logo-no-outline.png'),
backgroundColor: Colors.transparent,
);
@@ -98,7 +102,7 @@ class ProfileDrawerHeader extends HookConsumerWidget {
useEffect(
() {
buildUserProfileImage();
// buildUserProfileImage();
return null;
},
[],
@@ -136,7 +140,7 @@ class ProfileDrawerHeader extends HookConsumerWidget {
child: GestureDetector(
onTap: pickUserProfileImage,
child: Material(
color: Colors.grey[100],
color: isDarkMode ? Colors.grey[900] : Colors.grey[100],
elevation: 3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50.0),