Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

show topics and summaries for spaces

This commit is contained in:
Henry Hiles 2026-10-15 22:39:37 -04:00
commit ab3eda0beb
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
6 changed files with 60 additions and 38 deletions

View file

@ -0,0 +1,22 @@
import "package:material_ui/material_ui.dart";
/// A room or space's name, with its topic underneath if it has one, for app
/// bars.
class const RoomTitle(final String name, {final String? topic, super.key})
extends StatelessWidget {
@override
Widget build(BuildContext context) => Column(
crossAxisAlignment: .start,
children: [
Text(name, overflow: .ellipsis, maxLines: 1),
if (topic?.isNotEmpty == true)
Text(
topic!,
maxLines: 1,
overflow: .ellipsis,
style: Theme.of(context).textTheme.labelMedium
?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
),
],
);
}