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

@ -86,9 +86,7 @@ class Html extends ConsumerWidget {
),
errorBuilder: (_, error, _) => Text(
"Image Failed to Load",
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
style: .new(color: Theme.of(context).colorScheme.error),
),
height: height.toDouble(),
width: width?.toDouble(),
@ -146,15 +144,14 @@ class Html extends ConsumerWidget {
element.attributes
.mapTo<MapEntry<String, String>?>(
(key, value) => switch (key) {
"data-mx-color" => MapEntry("color", value),
"data-mx-bg-color" => MapEntry("background-color", value),
"data-mx-color" => .new("color", value),
"data-mx-bg-color" => .new("background-color", value),
_ => null,
},
)
.nonNulls,
),
},
onTapUrl: (url) =>
ref.watch(LaunchHelper.provider).launchUrl(Uri.parse(url)),
onTapUrl: (url) => ref.watch(LaunchHelper.provider).launchUrl(.parse(url)),
);
}