forked from Nexus/nexus
make room dialog scrollable
This commit is contained in:
parent
bd185824f9
commit
bf31f5510a
1 changed files with 42 additions and 38 deletions
|
|
@ -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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue