Uncaught Bad state: Invalid SVG data
static const logoAppbar = 'assets/icons/pmlm-en.svg';
SvgPicture.asset( AppImagesAssets.logoAppbar, height: 55, color: Theme.of(context).colorScheme.primary, semanticsLabel: 'PMLM', )
help me
bro did u find any solution this is occuring for me too
hey
const String svgNotifications = '''<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg"> <g id="Notificaction"> <path id="Vector" d="M14.271 25.8216C12.1758 25.825 10.4128 24.4259 9.94297 22.3409C9.86609 22.0001 9.72259 21.9104 9.4151 21.8865C8.42341 21.8096 7.43087 21.7319 6.44261 21.6191C4.54893 21.4022 3.33345 19.593 3.94418 17.8019C4.41311 16.4267 4.38407 15.0036 4.54124 13.5977C4.71463 12.0482 4.70951 10.48 5.2109 8.97153C6.53998 4.97062 10.5981 2.27061 14.7955 2.50209C18.9236 2.7293 22.9177 5.74791 23.7044 10.4731C23.9256 11.8005 23.9649 13.1586 24.0802 14.5039C24.1776 15.6349 24.2656 16.7564 24.6209 17.8574C25.1889 19.6178 23.9846 21.3962 22.1353 21.6157C21.1906 21.7285 20.2416 21.8053 19.2935 21.8737C18.8861 21.9027 18.6785 21.995 18.5692 22.4741C18.1147 24.4618 16.3236 25.8182 14.271 25.8216ZM14.2343 19.9672C16.7062 19.8066 19.1739 19.6537 21.639 19.4803C22.436 19.4239 22.6905 18.9883 22.4565 18.223C22.3078 17.7352 22.1344 17.2432 22.0823 16.741C21.9047 15.0293 21.7407 13.3149 21.6348 11.5981C21.4144 8.03451 18.6196 5.16452 15.2097 4.74C11.5906 4.28986 8.05783 6.55254 7.20281 10.0973C6.84321 11.5895 6.82527 13.1655 6.65786 14.7038C6.52888 15.8868 6.534 17.0869 6.1035 18.2281C5.81309 18.9968 6.11119 19.4231 6.95254 19.482C9.37666 19.652 11.8016 19.8057 14.2343 19.9655V19.9672ZM12.1877 22.0633C12.4269 23.0806 13.3793 23.6811 14.5153 23.6264C15.3242 23.5871 16.3654 22.7415 16.3372 22.0633H12.1877Z" fill="#0E3924"/> </g> </svg>''';
SvgPicture.string( svgNotifications, width: 28, height: 28, ),
Mine is a normal svg but try it like that, it worked for me
is there a callback at least that captures the error event so i could display a placeholder?
I was not getting this error locally on web, but was after deploying and building the app I was getting this error. What I found was I was referencing the svg as icons/my-icon.svg as opposed to assets/icons/my-icon.svg in my SvgPicture.asset(). Hope this helps.
I was not getting this error locally on web, but was after deploying and building the app I was getting this error. What I found was I was referencing the svg as
icons/my-icon.svgas opposed toassets/icons/my-icon.svgin mySvgPicture.asset(). Hope this helps.
Same issue, thanks for the solution.