Merge pull request #388 from pangeachat/limit-topic-height

Limit topic height
pull/1384/head
ggurdin 1 year ago committed by GitHub
commit 0eb8762cd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

File diff suppressed because it is too large Load Diff

@ -17,6 +17,7 @@ class ClassDescriptionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final iconColor = Theme.of(context).textTheme.bodyLarge!.color;
final ScrollController scrollController = ScrollController();
return Column(
children: [
ListTile(
@ -26,14 +27,27 @@ class ClassDescriptionButton extends StatelessWidget {
foregroundColor: iconColor,
child: const Icon(Icons.topic_outlined),
),
subtitle: Text(
room.topic.isEmpty
? (room.isRoomAdmin
? (room.isSpace
? L10n.of(context)!.classDescriptionDesc
: L10n.of(context)!.chatTopicDesc)
: L10n.of(context)!.topicNotSet)
: room.topic,
subtitle: ConstrainedBox(
constraints: const BoxConstraints(
maxHeight: 190,
),
child: Scrollbar(
controller: scrollController,
interactive: true,
child: SingleChildScrollView(
controller: scrollController,
primary: false,
child: Text(
room.topic.isEmpty
? (room.isRoomAdmin
? (room.isSpace
? L10n.of(context)!.classDescriptionDesc
: L10n.of(context)!.chatTopicDesc)
: L10n.of(context)!.topicNotSet)
: room.topic,
),
),
),
),
title: Text(
room.isSpace

Loading…
Cancel
Save