svg_painter 0.0.1-alpha.1 copy "svg_painter: ^0.0.1-alpha.1" to clipboard
svg_painter: ^0.0.1-alpha.1 copied to clipboard

Code generator that converts SVG files to Flutter CustomPainter classes. Use with svg_painter_annotation.

svg_painter #

Code generator that converts SVG files to Flutter CustomPainter classes.

Status #

This package is under development. Full functionality coming soon.

Installation #

Add to your pubspec.yaml:

dependencies:
  svg_painter_annotation: ^0.0.1

dev_dependencies:
  svg_painter: ^0.0.1
  build_runner: ^2.4.0

Usage #

  1. Annotate your class with @SvgPainter:
import 'package:svg_painter_annotation/svg_painter_annotation.dart';

part 'my_icon.g.dart';

@SvgPainter(filePath: 'assets/icon.svg')
class MyIcon extends _$MyIcon {}
  1. Run the generator:
dart run build_runner build
  1. Use the generated widget:
MyIcon(
  fillColor1: Colors.blue,
)

Features (Planned) #

Å

  • Convert SVG files to CustomPainter code
  • Support for basic shapes (circle, rect, path)
  • Customizable color parameters
  • Aspect ratio preservation

See Also #

1
likes
0
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Code generator that converts SVG files to Flutter CustomPainter classes. Use with svg_painter_annotation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, code_builder, source_gen, svg_painter_annotation, xml

More

Packages that depend on svg_painter