flutter_svg icon indicating copy to clipboard operation
flutter_svg copied to clipboard

support `viewBox` on `symbol` elements.

Open georgi0u opened this issue 4 years ago • 1 comments

I have an SVG that renders like so in Chrome: Screen Shot 2020-06-22 at 9 59 33 AM

And like so via flutter_svg: Screen Shot 2020-06-22 at 9 59 47 AM

The SVG markup is as follows:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-120 -168 240 336" preser\
veAspectRatio="none" class="card" face="AH" width="250" height="350">

  <symbol id="HA" viewBox="-500 -500 1000 1000" preserveAspectRatio="xMinYMid">
      <path d="M-270 460L-110 460M-200 450L0 -460L200 450M110 460L270 460M-120 130L120 130" stroke="red" stroke-width\
="80" stroke-linecap="square" stroke-miterlimit="1.5" fill="none"/>
  </symbol>

   <rect width="239" height="335" x="-119.5" y="-167.5" rx="12" ry="12" fill="white" stroke="black"/>

   <use xlink:href="#HA" height="32" width="32" x="-114.4" y="-156"/>

</svg>

georgi0u avatar Jun 22 '20 20:06 georgi0u

The viewBox attribute isn't supported on symbols right now.

dnfield avatar Jul 31 '20 17:07 dnfield