Edited common reaction emojis, display user avatar in reaction overview

This commit is contained in:
2023-09-09 18:08:08 +02:00
parent 68bfe92849
commit e01bb38af7
6 changed files with 42 additions and 24 deletions

View File

@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
import '../model/endpointData.dart';
class UserAvatar extends StatelessWidget {
final String username;
final bool isGroup;
const UserAvatar({required this.username, this.isGroup = false, super.key});
@override
Widget build(BuildContext context) {
return CircleAvatar(
foregroundImage: !isGroup ? Image.network("https://${EndpointData().nextcloud().full()}/avatar/$username/128").image : null,
backgroundColor: Theme.of(context).primaryColor,
foregroundColor: Colors.white,
onForegroundImageError: !isGroup ? (o, t) {} : null,
child: isGroup ? const Icon(Icons.group) : const Icon(Icons.person),
);
}
}