refactor badges

This commit is contained in:
Henry Hiles 2025-11-28 15:51:43 -05:00
commit 8d0eafae8a
No known key found for this signature in database
5 changed files with 26 additions and 9 deletions

View file

@ -31,9 +31,8 @@ class AvatarOrHash extends StatelessWidget {
child: Center(
child: Badge(
isLabelVisible: hasBadge,
label: SizedBox.shrink(),
offset: Offset(8, -8),
backgroundColor: Theme.of(context).colorScheme.primary,
smallSize: 8,
backgroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(4)),
child: SizedBox(

View file

@ -60,6 +60,14 @@ class RoomChat extends HookConsumerWidget {
.watch(CurrentRoomController.provider)
.betterWhen(
data: (room) {
if (room == null) {
return Center(
child: Text(
"Nothing to see here...",
style: theme.textTheme.headlineMedium,
),
);
}
final controllerProvider = RoomChatController.provider(
room.roomData,
);