flutter_svg icon indicating copy to clipboard operation
flutter_svg copied to clipboard

If we upload svg files in our domain or aws s3 bucket it's not working.

Open Sunsiha opened this issue 2 years ago • 3 comments

The following code am using for to load the image,

SvgPicture.network(
                      'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/AJ_Digital_Camera.svg',
                      placeholderBuilder: (context) =>
                          const CircularProgressIndicator(
                        color: AppColors.primaryPurple,
                      ),
                      height: 50.0,
                    )

The above link is not working. Then i have tried with different url(working svg link) this worked.

Why it is behaving like this. How can I sort this?

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (5 months ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

flutter_svg: ^1.0.0

======== Exception caught by SVG =================================================================== The following assertion was thrown while parsing PictureKey(Instance of 'NetworkPictureKeyData', colorFilter: null, theme: SvgTheme(currentColor: null, fontSize: 16.0, xHeight: 8.0)) in _getDefinitionPaint: Failed to find definition for url(#pattern0)

This library only supports and xlink:href references that are defined ahead of their references.

Sunsiha avatar Mar 02 '22 01:03 Sunsiha

@Sunsiha

Did you find any solution, we are facing the same issue.

sahhill avatar Jul 22 '22 12:07 sahhill

The following code am using for to load the image,

SvgPicture.network(
                      'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/AJ_Digital_Camera.svg',
                      placeholderBuilder: (context) =>
                          const CircularProgressIndicator(
                        color: AppColors.primaryPurple,
                      ),
                      height: 50.0,
                    )

The above link is not working. Then i have tried with different url(working svg link) this worked.

Why it is behaving like this. How can I sort this?

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (5 months ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

flutter_svg: ^1.0.0

======== Exception caught by SVG =================================================================== The following assertion was thrown while parsing PictureKey(Instance of 'NetworkPictureKeyData', colorFilter: null, theme: SvgTheme(currentColor: null, fontSize: 16.0, xHeight: 8.0)) in _getDefinitionPaint: Failed to find definition for url(#pattern0)

This library only supports and xlink:href references that are defined ahead of their references.

I Recieved same bug

umitmutluu avatar Dec 09 '22 10:12 umitmutluu

having the same issue!

nileshrathore avatar Dec 08 '23 00:12 nileshrathore