Open zxl777 opened 10 months ago
Try this:
ImageExtension(
builder: (extensionContext) {
final element = extensionContext.styledElement as ImageElement;
return ClipRRect(
borderRadius: BorderRadius.circular(5.0),
child: Image.network(
element.src,
),
);
},
),
In current 3.0.0-beta.2 ImageElement is not defined for me. What is the current status of img tag?
A bit hacky, but you can cast styledElement to dynamic:
final url = (extensionContext.styledElement as dynamic).src;
I previously added rounded corners to
<img>
tags in an older version of flutter_html, but how should I achieve the same effect with the new ImageExtension?