Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

onTapImage in Html widget doesn't work (version 3.0.0-alpha.6)

enter image description here

On the package page it says I can use the ‘onImageTap’ argument to provide a function when an image is tapped in the Html widget.
Here it says that there is no such parameter.
Can you help me out, I really need newer version cause a lot of packages depend on it. I can’t use 2.2.1 version.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you check the Migration guide you will see that:

onImageTap
This parameter is removed. Instead, add the OnImageTapExtension:

Html(
  data: ...,
  extensions: [
    OnImageTapExtension(
      onImageTap: (src, imgAttributes, element) {
        // Handle an image being tapped
      },
    ),
  ],
)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading