Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image cannot be displayed #1073

Open
yykou opened this issue May 30, 2024 · 2 comments
Open

image cannot be displayed #1073

yykou opened this issue May 30, 2024 · 2 comments

Comments

@yykou
Copy link

yykou commented May 30, 2024

An SVG image on a web page that can be opened normally will result in a black area when loaded using the latest version of the library, and the image cannot be displayed.

SVG image path:https://ccdn1.goodq.top/caches/3802cdfcb59f037aa40858825f9f3e24/aHR0cHM6Ly9zdmdzLjR2eC5uZXQvcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDIxLzA0LzBhYTNlNzQwYzU0ZjMxZjY0YmIyODE3OTc2ZjQwODJkLnN2Zw_p_p100_p_3D_p_p100_p_3D.svg

code:
SvgPicture.network( 'https://ccdn1.goodq.top/caches/3802cdfcb59f037aa40858825f9f3e24/aHR0cHM6Ly9zdmdzLjR2eC5uZXQvcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDIxLzA0LzBhYTNlNzQwYzU0ZjMxZjY0YmIyODE3OTc2ZjQwODJkLnN2Zw_p_p100_p_3D_p_p100_p_3D.svg', semanticsLabel: 'A shark?!', width: 50.0, height: 50.0, placeholderBuilder: (BuildContext context) => Container( padding: const EdgeInsets.all(30.0), child: const CircularProgressIndicator()), )

The final display effect:
Clipboard - 2024年5月30日下午3点24分

@yykou
Copy link
Author

yykou commented May 30, 2024

[√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [版本 10.0.19045.4412], locale zh-CN)
• Flutter version 3.19.0 on channel stable at C:\yykou\flutter_sdk\flutter_windows_3.19.0-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision bae5e49bc2 (4 months ago), 2024-02-13 17:46:18 -0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1

@s681562
Copy link

s681562 commented Jun 24, 2024

Same error. Either black rectangle is showing or nothing is showing.
It looks like flutter_svg can not encode svg images created by
<!-- Generator: Adobe Illustrator 27.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->

Code:
IconButton( padding: EdgeInsets.zero, constraints: BoxConstraints(), icon: SvgPicture.asset("assets/images/gdb_logo_negative.svg"), onPressed: () { // ToDo https://gemeinsamdigital.berlin.de/de/ }, ),

Try this out:

gdb_kfw_bwsb_sk_rgb

Result:

KakaoTalk_20240624_091003776

Try this out:

gdb_logo_negativ

Result:

KakaoTalk_20240624_091017138

Try this out:

gdb_logo_positive

Result:

KakaoTalk_20240624_091028986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants