treewide cleanups

This commit is contained in:
Henry Hiles 2026-10-23 20:26:37 -04:00
commit 853116ab2f
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
10 changed files with 88 additions and 138 deletions

View file

@ -399,11 +399,11 @@ class const Composer(
if (!shiftPressed) {
send();
return KeyEventResult.handled;
return .handled;
}
}
return KeyEventResult.ignored;
return .ignored;
},
// Overrides the keyboard shortcut for pasting
child: Actions(

View file

@ -38,7 +38,7 @@ class const RelationPreview(
onPressed: toggleShouldMention,
child: Text(
shouldMention ? "@On" : "@Off",
style: TextStyle(
style: .new(
fontWeight: .w900,
color: shouldMention ? null : Theme.of(context).disabledColor,
),

View file

@ -76,7 +76,7 @@ class const Html(
src == null
? SizedBox.shrink()
: InlineCustomWidget(
alignment: PlaceholderAlignment.middle,
alignment: .middle,
child: ExpandableImage(
.new(mxc: src),
downloadFilename: src.pathSegments.last,

View file

@ -49,7 +49,7 @@ class const MessageDisplayname(
final children => Row(
spacing: 4,
mainAxisSize: .min,
children: [for (final child in children) Flexible(child: child)],
children: children.map((child) => Flexible(child: child)).toList(),
),
},
),

View file

@ -27,7 +27,7 @@ final class const MessageImage(
child: Image(
image: MxcImage(ref, request),
width: info?.width?.toDouble(),
fit: BoxFit.fitWidth,
fit: .fitWidth,
loadingBuilder: (_, child, loadingProgress) =>
loadingProgress == null
? child

View file

@ -151,7 +151,7 @@ class const NotificationsList({super.key})
listController: listController.value,
controller: scrollController,
itemCount: value.length,
padding: const EdgeInsets.symmetric(
padding: const .symmetric(
horizontal: 8,
vertical: 12,
),

View file

@ -146,7 +146,7 @@ final class const RoomMenuButton(
),
child: ListTile(
leading: Icon(Icons.logout, color: danger),
title: Text("Leave", style: TextStyle(color: danger)),
title: Text("Leave", style: .new(color: danger)),
),
),
],

View file

@ -42,7 +42,7 @@ final class const DialogListTile<T>({
child: Chip(
label: Text(
value is T ? getName(value as T) : "None",
overflow: TextOverflow.ellipsis,
overflow: .ellipsis,
style: onChanged == null || saving.active
? .new(color: Colors.grey)
: null,

View file

@ -36,7 +36,7 @@ final class const RadioSheet<T>({
onChanged: (value) => chosen.value = (value as T,),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisSize: .min,
children: options
.map(
(option) => RadioListTile<T>(

View file

@ -67,7 +67,7 @@ class const SyncStatusBanner({super.key}) extends ConsumerWidget {
banner.title,
maxLines: 1,
overflow: .ellipsis,
style: TextStyle(
style: .new(
color: banner.foreground,
fontWeight: .bold,
),