svg_to_path_generator

Creator: coderz1093

Last updated:

0 purchases

svg_to_path_generator Image
svg_to_path_generator Images

Languages

Categories

Add to Cart

Description:

svg to path generator

Getting Started #
This package uses to generate Widget with Custom Painter inside from svg source.
Installation #
dependencies:
...
svg_to_path_annotation: <latest_version>

dev_dependencies:
...
build_runner: <latest_version>
svg_to_path_generator: <latest_version>
copied to clipboard
examples #
Annotate come class by @SvgSource('<path-to-svg>'):
import 'package:svg_to_path_annotation/svg_to_path_annotation.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/rendering.dart';

part 'card.g.dart';

@SvgSource('assets/Card.svg')
class CardSvg extends _CardSvg {
}

copied to clipboard
Then run:
flutter pub run build_runner build --delete-conflicting-outputs
Use generated widget:
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF555555),
body: Center(
child: Container(
height: 500,
width: 500,
child: CardSvg(),
),
),
);
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.