How to define height and width to an image inside Flutter Markdown?

748

you can use #50x50 mean #width x height

![Flutter logo](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSobAPMeqgsRtHrX8vclVHPggkhqcSt0q1ixhyokNq3Wa16TGF6Mp34Cjo#50x50)
Share:
748
Md Abdul Halim Rafi
Author by

Md Abdul Halim Rafi

Co-Founder of Mainly Coding Acquired by Shikho Technology in January 2022. Languages - Javascript, Dart Framework - ReactJs, NodeJs, Flutter CSS Framework - Material UI, Semantic UI Cloud - Firebase, GCP, AWS DB - MySQL, Firestore (NoSQL)

Updated on December 13, 2022

Comments

  • Md Abdul Halim Rafi
    Md Abdul Halim Rafi over 1 year

    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.

    • Norberto Martín Afonso
      Norberto Martín Afonso over 4 years
      Perhaps the answers to this question could help you: stackoverflow.com/questions/44665955/…
    • Johan Witters
      Johan Witters over 4 years
      As explained in the following link, markdown would support the ability to specify the size of the image. stackoverflow.com/questions/14675913/… 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.