I am trying to add NetworkImage inside Container but when I add .svg image I get error but it works for the other formats like .png, .jpeg, etc
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage("https://upload.wikimedia.org/wikipedia/en/e/eb/Manchester_City_FC_badge.svg")
)
)
Error:
E/flutter (22336): [ERROR:flutter/lib/ui/painting/codec.cc(97)] Failed decoding image. Data is either invalid, or it is encoded using an unsupported format.
Flutter Doesn't support svg format yet (issue).
You can use flutter_svg 0.13.0+2, a library to load and show svg files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With