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

An asset transformer for `jovial_svg`. Converts SVG or AVD assets into binary format.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:jovial_svg/jovial_svg.dart';

void main() {
  runApp(const MinimalSample());
}

///
/// A minimal sample application using `jovial_svg_transformer` during the
/// build to convert an SVG into an SI binary file.  Note that the SI file
/// retains the ".svg" extension - that's an artifact of the way Google does
/// transformers.
///
/// The more interesting part of this example is the pubspec.yaml.
///
///
class MinimalSample extends StatelessWidget {
  const MinimalSample({super.key});

  @override
  Widget build(BuildContext context) {
    final ab = DefaultAssetBundle.of(context);
    return MaterialApp(
        title: 'SVG Minimal Sample',
        home: ScalableImageWidget.fromSISource(
            si: ScalableImageSource.fromSI(ab, 'assets/tiger.svg')));
  }
}
1
likes
0
pub points
7%
popularity

Publisher

verified publisherjovial.com

An asset transformer for `jovial_svg`. Converts SVG or AVD assets into binary format.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, jovial_misc, jovial_svg

More

Packages that depend on jovial_svg_transformer