1
0
Fork 0
forked from Nexus/nexus

treewide: use dot shorthands where possible

Now this feature is stable, we should use it. I might have missed some usecases, but these can be added in future commits.
This commit is contained in:
Henry Hiles 2026-06-02 11:53:14 -04:00
commit d2ec5f035b
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
67 changed files with 391 additions and 534 deletions

View file

@ -38,17 +38,17 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
: () => showDialog(
context: context,
builder: (context) => Dialog(
constraints: BoxConstraints.loose(Size.fromWidth(400)),
constraints: .loose(.fromWidth(400)),
child: Padding(
padding: EdgeInsetsGeometry.all(24),
padding: .all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: .min,
crossAxisAlignment: .start,
spacing: 8,
children: [
Row(
spacing: 12,
mainAxisSize: MainAxisSize.min,
mainAxisSize: .min,
children: [
if (room.metadata?.avatar != null)
ExpandableImage(
@ -71,7 +71,7 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
Expanded(
child: Text(
room.metadata?.name ?? "Unnamed Room",
overflow: TextOverflow.ellipsis,
overflow: .ellipsis,
maxLines: 3,
style: Theme.of(context).textTheme.headlineSmall,
),
@ -105,18 +105,18 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
title: room == null
? null
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: .start,
children: [
Text(
room.metadata?.name ?? "Unnamed Room",
overflow: TextOverflow.ellipsis,
overflow: .ellipsis,
maxLines: 1,
),
if (room.metadata?.topic?.isNotEmpty == true)
Text(
room.metadata!.topic!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
overflow: .ellipsis,
style: Theme.of(context).textTheme.labelMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),