websafe_svg 1.0.0 copy "websafe_svg: ^1.0.0" to clipboard
websafe_svg: ^1.0.0 copied to clipboard

outdated

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

websafe_svg #

Dart Publisher

A Flutter compatible library to handle SVGs for Android, iOS, and Web.

The color attribute assumes that the SVG is white on Web. It will look for and replace the four following strings to attempt to set the color:

  • "#FFFFFF"
  • "#ffffff"
  • "#FFF"
  • "#fff"

If the SVG does not include one of those strings then the color option will be a no-op and the SVG will use whatever color is set.

Using the library #

Add the repo to your Flutter pubspec.yaml file.

dependencies:
  websafe_svg: <<version>> 

Then run...

flutter packages get

Supports #

  • asset
  • network
  • memory
  • string

Example #

import 'package:websafe_svg/websafe_svg.dart';

...
Widget build(BuildContext context) {
  return WebsafeSvg.asset(...);
}
107
likes
0
pub points
94%
popularity

Publisher

verified publisherpeifferinnovations.com

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

convert, flutter, flutter_svg, http, logging, meta

More

Packages that depend on websafe_svg