I have SVG file on server side named sprite-icons.svg:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="icon-1" viewBox="0 0 826800 826800">
<path fill="#222222" d="M201379 197582l31452 0 0 432178 -31452 0 0 -432178zm122701 72034l33469 0 0 282159 -33469 0 0 -282159zm138450 74734l31666 0 0 135933 -31666 0 0 -135933zm131388 -147310l31503 0 0 432178 -31503 0 0 -432178z"/>
</symbol>
<symbol id="icon-2" viewBox="0 0 826800 826800">
<path fill="#aaaaaa" d="M201379 197582l31452 0 0 432178 -31452 0 0 -432178zm122701 72034l33469 0 0 282159 -33469 0 0 -282159zm138450 74734l31666 0 0 135933 -31666 0 0 -135933zm131388 -147310l31503 0 0 432178 -31503 0 0 -432178z"/>
</symbol>
</svg>
I have url to get it, but when I try do it with flutter_svg this way:
SvgPicture.network('https://some-domain.com/img/sprite-icons.svg')
// or
SvgPicture.network('https://some-domain.com/img/sprite-icons.svg#icon-1')
I'm getting an error:
StateError (Bad state: SVG did not specify dimensions
The SVG library looks for a `viewBox` or `width` and `height` attribute to determine the viewport boundary of the SVG. Note that these attributes, as with all SVG attributes, are case sensitive.
Is it possible to get such SVG sprite file and render included svgs (icon-1 and icon-2) with flutter_svg? Or any other way? Thanks.