forked from Henry-Hiles/nexus
fix image alignment
This commit is contained in:
parent
9a3f7e9bdc
commit
c4270fa34a
1 changed files with 2 additions and 3 deletions
|
|
@ -51,8 +51,9 @@ class Html extends ConsumerWidget {
|
||||||
|
|
||||||
"img" =>
|
"img" =>
|
||||||
element.attributes["src"] == null
|
element.attributes["src"] == null
|
||||||
? null
|
? SizedBox.shrink()
|
||||||
: InlineCustomWidget(
|
: InlineCustomWidget(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
Uri.parse(element.attributes["src"]!)
|
Uri.parse(element.attributes["src"]!)
|
||||||
.mxcToHttps(
|
.mxcToHttps(
|
||||||
|
|
@ -125,9 +126,7 @@ class Html extends ConsumerWidget {
|
||||||
.mapTo<MapEntry<String, String>?>(
|
.mapTo<MapEntry<String, String>?>(
|
||||||
(key, value) => switch (key) {
|
(key, value) => switch (key) {
|
||||||
"data-mx-color" => MapEntry("color", value),
|
"data-mx-color" => MapEntry("color", value),
|
||||||
|
|
||||||
"data-mx-bg-color" => MapEntry("background-color", value),
|
"data-mx-bg-color" => MapEntry("background-color", value),
|
||||||
|
|
||||||
_ => null,
|
_ => null,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue