4

I want to use custom height and width of image inside Flutter Markdown String. How can I do that?

    String markdownString = """
  You can include images:

![Flutter logo](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSobAPMeqgsRtHrX8vclVHPggkhqcSt0q1ixhyokNq3Wa16TGF6Mp34Cjo)
""";

In my case it is showing the actual size of the image, But I want to give it custom height and weight.

Md Abdul Halim Rafi
  • 1,810
  • 1
  • 17
  • 25
  • Perhaps the answers to this question could help you: https://stackoverflow.com/questions/44665955/how-do-i-determine-the-width-and-height-of-an-image-in-flutter – Norberto Martín Afonso Aug 24 '19 at 11:20
  • 1
    As explained in the following link, markdown would support the ability to specify the size of the image. https://stackoverflow.com/questions/14675913/changing-image-size-in-markdown Unfortunatly flutter_markdown does not support this. What I'm considering to do is put the image in a table, which allows to resize to some degree, but it's obviously not ideal / what we need. – Johan Witters Feb 09 '20 at 11:23

1 Answers1

5

you can use #50x50 mean #width x height

![Flutter logo](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSobAPMeqgsRtHrX8vclVHPggkhqcSt0q1ixhyokNq3Wa16TGF6Mp34Cjo#50x50)
Yousif khalid
  • 5,801
  • 3
  • 18
  • 23