svg_image 0.0.2
svg_image: ^0.0.2 copied to clipboard
Display svg & normal image by one widget
svg_image #
svg_image is a Flutter package that allows you to easily view SVG files or other images using a single widget.
Introduction #
The svg_image package simplifies the process of displaying SVG files or images in your Flutter app. With a unified widget, you can load images from different sources with minimal configuration.
Features #
- Load and display SVG files.
- Supports network and asset image paths.
- Simple and easy-to-use API.
Installation #
Add the following to your pubspec.yaml file:
dependencies:
svg_image: ^0.0.1
Example #
import 'package:flutter/material.dart'; import 'package:svg_image/svg_image.dart';
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: Text('SVG Image Example'), ), body: Center( child: SvgImage( path: 'YOUR_PATH', type: PathType.network, // Change to PathType.asset for asset images ), ), ), ); } }