design: Improved spaces UX

This commit is contained in:
Christian Kußowski 2025-10-19 12:10:14 +02:00
commit 2538f31351
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
6 changed files with 410 additions and 193 deletions

View file

@ -30,7 +30,9 @@ class PublicRoomDialog extends StatelessWidget {
final result = await showFutureLoadingDialog<String>(
context: context,
future: () async {
if (chunk != null && client.getRoomById(chunk.roomId) != null) {
if (chunk != null &&
client.getRoomById(chunk.roomId) != null &&
client.getRoomById(chunk.roomId)?.membership != Membership.leave) {
return chunk.roomId;
}
final roomId = chunk != null && knock

View file

@ -18,6 +18,8 @@ class Avatar extends StatelessWidget {
final BorderRadius? borderRadius;
final IconData? icon;
final BorderSide? border;
final Color? backgroundColor;
final Color? textColor;
const Avatar({
this.mxContent,
@ -30,6 +32,8 @@ class Avatar extends StatelessWidget {
this.borderRadius,
this.border,
this.icon,
this.backgroundColor,
this.textColor,
super.key,
});
@ -71,14 +75,16 @@ class Avatar extends StatelessWidget {
height: size,
placeholder: (_) => noPic
? Container(
decoration: BoxDecoration(color: name?.lightColorAvatar),
decoration: BoxDecoration(
color: backgroundColor ?? name?.lightColorAvatar,
),
alignment: Alignment.center,
child: Text(
fallbackLetters,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: 'RobotoMono',
color: Colors.white,
color: textColor ?? Colors.white,
fontWeight: FontWeight.bold,
fontSize: (size / 2.5).roundToDouble(),
),