flutter_svg_provider
1.0.7, released 3 years ago by an unverified publisher
Generate image provider from svg path for Flutter Image widgets.
What it does
Generates a custom ImageProvider from SVG paths, allowing SVGs to be used directly inside standard Flutter Image widgets. It uses flutter_svg and http dependencies under the hood to parse and render SVG assets or network paths.
AI-written summary of version 1.0.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to pass an SVG as an image provider to widgets that expect ImageProvider.
- You want to render SVGs using standard Flutter Image widgets.
Skip it when
- You can use flutter_svg directly with SvgPicture widgets instead of an ImageProvider.
- You require advanced caching or transformation features provided by other image packages.
Strengths
- Allows using SVGs anywhere an ImageProvider is accepted.
- Supports assets, file system, and network SVG paths.
Weaknesses
- Relies on external packages like flutter_svg and http.
- Limited to what a custom ImageProvider can do compared to dedicated picture widgets.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
not documented
import 'package:flutter_svg_provider/flutter_svg_provider.dart';
Image(
width: 32,
height: 32,
image: Svg('assets/my_icon.svg'),
)Alternatives
Packages that do the same job and could replace flutter_svg_provider.
- vector_graphics
Alternative graphics library for rendering vector assets efficiently.
94Compare
Works with
Packages commonly used together with flutter_svg_provider: ones it builds on, ones built on it, and its own family.
- flutter_svgflutter_svg_provider depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- fan_carousel_image_sliderBuilt on flutter_svg_providerA carousel slider widget for displaying online and local images with fan effects.
- userorient_flutterBuilt on flutter_svg_providerFeature voting board and feedback collection widget for Flutter apps.