refactor: Avatar widget

This commit is contained in:
Krille Fear 2021-11-20 10:42:23 +01:00
commit 53967eb1f0
20 changed files with 69 additions and 47 deletions

View file

@ -18,9 +18,9 @@ class Avatar extends StatelessWidget {
final Client? client;
final double fontSize;
const Avatar(
const Avatar({
this.mxContent,
this.name, {
this.name,
this.size = defaultSize,
this.onTap,
this.client,

View file

@ -87,7 +87,12 @@ class _ContactListTile extends StatelessWidget {
height: Avatar.defaultSize,
child: Stack(
children: [
Center(child: Avatar(avatarUrl, displayname)),
Center(
child: Avatar(
mxContent: avatarUrl,
name: displayname,
),
),
Align(
alignment: Alignment.bottomRight,
child: Icon(