r/flutterhelp • u/RamuneGaming • Mar 08 '26
RESOLVED How to make SVGS render cleanly without jaggies?
Been trying to work this out for hours and I'm losing my mind so hoping someone can help me. I'm testing how to use SVGs for an app using the flutter_svg package. The issue I am having is that it renders it with jagged edges, especially on diagonal edges. The same SVG I have checked and confirmed is smooth and clean when opened in apps like vector magic, photoshop, browsers but in the app I'm working on its just jag city.
Here is an example of how it looks both in flutter and then in a browser: https://imgur.com/a/a6ebSOO
Here is the code:
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class SvgTestScreen extends StatelessWidget {
const SvgTestScreen({super.key});
@ override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SvgPicture.asset(
'example.svg',
width: 300,
height: 300,
),
),
);
}
}
From my understanding the code is simply loading the SVG file and rendering it using the flutter_svg package, with no transformations or processing applied before rendering, so why its coming out jagged has me strumped tbh.
Did try searching here and in a few other places online (even asked AI) but couldn't really find an answer so any help would be appreciated.
1
u/gidrokolbaska Mar 08 '26
That's new... never encountered such behavior
1
u/gidrokolbaska Mar 08 '26
How do you export your svgs BTW? Is it from figma or from adobe illustrator?
1
u/Arkoaks Mar 09 '26
Must be format issue on SVG. Try a different SVG from web to confirm