jovial_svg_transformer 1.0.2 copy "jovial_svg_transformer: ^1.0.2" to clipboard
jovial_svg_transformer: ^1.0.2 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
160
points
159
downloads

Publisher

verified publisherjovial.com

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, jovial_misc, jovial_svg

More

Packages that depend on jovial_svg_transformer