make room dialog scrollable

This commit is contained in:
Henry Hiles 2026-08-08 16:21:58 -04:00
commit bf31f5510a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -40,48 +40,52 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
constraints: .loose(.fromWidth(400)), constraints: .loose(.fromWidth(400)),
child: Padding( child: Padding(
padding: .all(24), padding: .all(24),
child: Column( child: SingleChildScrollView(
mainAxisSize: .min, child: Column(
crossAxisAlignment: .start, mainAxisSize: .min,
spacing: 8, crossAxisAlignment: .start,
children: [ spacing: 8,
Row( children: [
spacing: 12, Row(
mainAxisSize: .min, spacing: 12,
children: [ mainAxisSize: .min,
if (room.metadata?.avatar != null) children: [
ExpandableImage( if (room.metadata?.avatar != null)
room.metadata?.avatar == null ExpandableImage(
? null room.metadata?.avatar == null
: .new(mxc: room.metadata!.avatar!), ? null
child: AvatarOrHash( : .new(mxc: room.metadata!.avatar!),
room.metadata?.avatar, child: AvatarOrHash(
room.metadata?.avatar,
room.metadata?.name ?? "Unnamed Room",
height: 64,
fallback: Icon(Icons.numbers),
),
),
Expanded(
child: Text(
room.metadata?.name ?? "Unnamed Room", room.metadata?.name ?? "Unnamed Room",
height: 64, overflow: .ellipsis,
fallback: Icon(Icons.numbers), maxLines: 3,
), style: Theme.of(
),
Expanded(
child: Text(
room.metadata?.name ?? "Unnamed Room",
overflow: .ellipsis,
maxLines: 3,
style: Theme.of(context).textTheme.headlineSmall,
),
),
],
),
if (room.metadata?.topic?.isNotEmpty == true)
LinkifiedText(
room.metadata!.topic!,
style: Theme.of(context).textTheme.bodyLarge
?.copyWith(
color: Theme.of(
context, context,
).colorScheme.onSurfaceVariant, ).textTheme.headlineSmall,
), ),
),
],
), ),
], if (room.metadata?.topic?.isNotEmpty == true)
LinkifiedText(
room.metadata!.topic!,
style: Theme.of(context).textTheme.bodyLarge
?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurfaceVariant,
),
),
],
),
), ),
), ),
), ),