diff --git a/lib/src/replaced_element.dart b/lib/src/replaced_element.dart index 666ced5073..06c4126516 100644 --- a/lib/src/replaced_element.dart +++ b/lib/src/replaced_element.dart @@ -138,16 +138,15 @@ class ImageContentElement extends ReplacedElement { } }); image.image.resolve(ImageConfiguration()).addListener( - ImageStreamListener( - (ImageInfo image, bool synchronousCall) { - var myImage = image.image; - Size size = Size(myImage.width.toDouble(), myImage.height.toDouble()); - completer.complete(size); - }, onError: (object, stacktrace) { - completer.completeError(object); - } - ), - ); + ImageStreamListener((ImageInfo image, bool synchronousCall) { + var myImage = image.image; + Size size = + Size(myImage.width.toDouble(), myImage.height.toDouble()); + completer.complete(size); + }, onError: (object, stacktrace) { + completer.completeError(object); + }), + ); imageWidget = FutureBuilder( future: completer.future, builder: (BuildContext buildContext, AsyncSnapshot snapshot) { @@ -158,7 +157,8 @@ class ImageContentElement extends ReplacedElement { height: snapshot.data.height, frameBuilder: (ctx, child, frame, _) { if (frame == null) { - return Text(alt ?? "", style: context.style.generateTextStyle()); + return Text(alt ?? "", + style: context.style.generateTextStyle()); } return child; }, @@ -418,12 +418,12 @@ ReplacedElement parseReplacedElement( ); case "iframe": return IframeContentElement( - name: "iframe", - src: element.attributes['src'], - width: double.tryParse(element.attributes['width'] ?? ""), - height: double.tryParse(element.attributes['height'] ?? ""), - navigationDelegate: navigationDelegateForIframe, - ); + name: "iframe", + src: element.attributes['src'], + width: double.tryParse(element.attributes['width'] ?? ""), + height: double.tryParse(element.attributes['height'] ?? ""), + navigationDelegate: navigationDelegateForIframe, + node: element); case "img": return ImageContentElement( name: "img",