Remove flutter chat #26

Manually merged
Henry-Hiles merged 108 commits from remove-flutter-chat into main 2026-05-22 15:26:28 -04:00
Showing only changes of commit b9e42ec51b - Show all commits

constrain images to a max size

Henry Hiles 2026-05-19 11:05:40 -04:00
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -96,17 +96,7 @@ class RenderEvent extends ConsumerWidget {
Flexible(child: timestamp),
],
),
ClipRRect(
borderRadius: textOnly
? BorderRadius.zero
: BorderRadius.all(Radius.circular(8)),
child: Container(
padding: textOnly
? EdgeInsets.zero
: EdgeInsets.symmetric(vertical: 8, horizontal: 12),
decoration: textOnly
? null
: BoxDecoration(
Card(
color:
ref.watch(
ClientStateController.provider.select(
@ -118,7 +108,9 @@ class RenderEvent extends ConsumerWidget {
? colorScheme.onPrimary
: colorScheme.primaryContainer)
: colorScheme.surfaceContainer,
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -185,6 +177,8 @@ class RenderEvent extends ConsumerWidget {
).colorScheme.primary,
),
),
if (!textOnly)
if (event.content case ImageMessageContent(
:final url,
:final info,
@ -196,7 +190,11 @@ class RenderEvent extends ConsumerWidget {
),
),
)) {
final url? => ExpandableImage(
final url? => ConstrainedBox(
constraints: BoxConstraints.loose(
Size.fromWidth(500),
),
child: ExpandableImage(
url.toString(),
child: ClipRRect(
borderRadius: BorderRadius.all(
@ -216,7 +214,8 @@ class RenderEvent extends ConsumerWidget {
loadingProgress == null
? child
: switch (info?.blurHash) {
final blurHash? => SizedBox(
final blurHash? =>
SizedBox(
width:
info?.width ??
info?.height ??
@ -246,6 +245,7 @@ class RenderEvent extends ConsumerWidget {
),
),
),
),
_ => Text(
"Nexus currently cannot handle encrypted media",
style: errorStyle,