Skip to content

Svg ImageProvider for Flutter. Use jovial_svg or WebView to parse svg and use flutter_cache_manager to cache svg files.

License

Notifications You must be signed in to change notification settings

xuelongqy/flutter_svg_image

Repository files navigation

flutter_svg_image

Svg ImageProvider for Flutter. Use jovial_svg or WebView to parse svg and use flutter_cache_manager to cache svg files.

Getting Started

import 'package:flutter_svg_image/flutter_svg_image.dart';

Image(
  fit: BoxFit.contain,
  image: SvgImage.cachedNetwork(
    'https://jovial.com/images/jupiter.svg',
  ),
);

// Or

ScalableImageWidget.fromSISource(
  fit: BoxFit.contain,
  si: CachedNetworkSvgSource(
    'https://jovial.com/images/jupiter.svg',
  ),
);

// WebView

SvgWebImage.initWebView();
Image(
  fit: BoxFit.contain,
  image: SvgWebImage.cachedNetwork(
    'https://jovial.com/images/jupiter.svg',
    cacheSvg: true,
  ),
);

About

Svg ImageProvider for Flutter. Use jovial_svg or WebView to parse svg and use flutter_cache_manager to cache svg files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published