fix image alignment

This commit is contained in:
Henry Hiles 2026-03-13 13:18:56 -04:00
commit c4270fa34a
No known key found for this signature in database

View file

@ -51,8 +51,9 @@ class Html extends ConsumerWidget {
"img" =>
element.attributes["src"] == null
? null
? SizedBox.shrink()
: InlineCustomWidget(
alignment: PlaceholderAlignment.middle,
child: Image.network(
Uri.parse(element.attributes["src"]!)
.mxcToHttps(
@ -125,9 +126,7 @@ class Html extends ConsumerWidget {
.mapTo<MapEntry<String, String>?>(
(key, value) => switch (key) {
"data-mx-color" => MapEntry("color", value),
"data-mx-bg-color" => MapEntry("background-color", value),
_ => null,
},
)