-
-
Notifications
You must be signed in to change notification settings - Fork 173
svg icons are not rendered correctly #255
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
Comments
what method are you using for rendering the svg images? which package are you using? or is there some way to render svgs with vanilla flutter? |
I'm using latest version of flutter_svg package. example:
I'm using this package for different projects and its working fine in android/iOS, web. |
Can you send me some example svgs that don't work for you? |
sure. I emailed you ([email protected]) some pictures. |
Somehow these all work fine for me: VID_20220703_180713.mp4(EDIT: different link: https://photos.app.goo.gl/giPr8Gwc9czB5uTq6) This is with latest flutter-pi and flutter 3.0.3. (I used the It could be a weird Heisenbug maybe some race condition with rendering. You can try fiddling with the rendering a bit, maybe add an invisible overlay layer or something. (That helped in the past) Other than that you can also try reducing the pages of your app where the problem ocurrs to some minimal code that reproduces the issue. I don't know if this is a graphics driver, flutter, flutter_svg or flutter-pi bug and I'd like to look into it, but I can't do anything when I can't reproduce it |
Thank you so much dear @ardera.
can you provide an example please?
The pages that this problem occurs, are not heavy. first I'm getting data from database or shared_preferences and then give the values to the UI and everything was working fine with flutter-pi corresponding to the flutter 2.8. |
Hi, @ardera Thanks for this fantastic project! |
@dLogicC |
3.0.3, but also in version 3.0.0 there was the same problem. |
Opacity(opacity: 0.9999, child: ...);
DecoratedBox(
position: DecorationPosition.foreground,
decoration: BoxDecoration(
color: const Color(0x01000000),
),
child: ...
);
Stack(children: [..., Positioned.fill(child: ColoredBox(color: Colors.transparent)]);
RepaintBoundary(child: ...); something like that |
@ardera |
Hi @BigGitWorld I had the same problem. For me the solution was to add some missing libraries to my image. Specifically I followed the instructions in: https://github.com/jwinarske/manifests/tree/honister for the DRM version. Make sure to rename flutter-pi to flutter-pi-release though. Otherwise you will get "Nothing provides flutter-pi" from bitbake. Hope this will help you. |
It could be this is caused by flutter enabling usage of stencil buffers in 3.0: https://github.com/flutter/engine/blob/d1b9a6938ad77326ac3a94d92bbc77933ed829ed/shell/platform/embedder/embedder.cc#L624 They were disabled in 3.3 again though, so if that's the cause the rendering artifacts should be gone in 3.3. |
I'll add |
Hi.
I was using flutter-pi corresponding to flutter 2.8 and everything was working fine in both my laptop (ubuntu) and raspberrypi.
I upgraded my flutter to the version 3.0.3 and also updated flutter-pi and engine-binaries, but I don't know why my SVG icons are not shown correctly sometimes in the raspberrypi (I tested it both debug and release mode), while everything is working fine in my laptop (ubuntu).
The following images are 2 cases from raspberrypi :
bad rendered images:

correct images:

what is the problem?
The text was updated successfully, but these errors were encountered: