flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

[BUG] TagWrapExtension not working for iframe Tag

Open balaji101010 opened this issue 2 years ago • 0 comments

I'm using flutter_html 3.0.0 beta 2 version

Device : Android 12

  extensions: <HtmlExtension>[
        ImageExtension(builder: (ExtensionContext extensionContext) {
          final ImageElement element =
              extensionContext.styledElement as ImageElement;
          return Padding(
            padding: imagePadding ?? EdgeInsets.zero,
            child: CachedNetworkImage(
                    imageUrl: element.src,
                    width: MediaQuery.of(context).size.width,
                    fit: BoxFit.cover,
                  ),
          );
        }),
        const VideoHtmlExtension(),
        const IframeHtmlExtension(),
        TagWrapExtension(
            tagsToWrap: <String>{'iframe'},
            builder: (Widget child) {
              return ColoredBox(
                color: Colors.red,
                child: FittedBox(
                  fit: BoxFit.fill,
                  child: SizedBox(
                      width: MediaQuery.of(context).size.width,
                      height: 200,
                      child: child),
                ),
              );
            })
      ],

I don't get a call in builder function of the TagWrapExtension

balaji101010 avatar Jul 27 '23 12:07 balaji101010