Add admin section

This commit is contained in:
krawieck 2020-09-08 19:14:05 +02:00
parent c38fc3f7a0
commit 8c5def182d
1 changed files with 26 additions and 0 deletions

View File

@ -244,6 +244,32 @@ class _AboutTab extends HookWidget {
title: Center(child: Text('See all')),
onTap: () => print('GO TO COMMUNITIES'),
),
_Divider(),
ListTile(
title: Center(
child: Text(
'Admins:',
style: theme.textTheme.headline6.copyWith(fontSize: 18),
),
),
),
...site.admins.map((e) => ListTile(
title: Text(e.preferredUsername ?? '@${e.name}'),
onTap: () => print('GO TO USER ${e.name}'),
leading: e.avatar != null
? CachedNetworkImage(
height: 50,
width: 50,
imageUrl: e.avatar,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
fit: BoxFit.cover, image: imageProvider),
),
))
: SizedBox(width: 50),
)),
SizedBox(height: 20),
],
),