svg_maker 0.0.3 copy "svg_maker: ^0.0.3" to clipboard
svg_maker: ^0.0.3 copied to clipboard

Package that helps with svg creation. After creating an svg object user can add elements and modify their attributes.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart' hide Svg;
import 'package:svg_maker/svg_maker.dart';

void main() {
  runApp(ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    final Svg svg = Svg.create(width: "200", height: "100")
      ..addShape(
        SvgRect()
          ..width = '200'
          ..height = '200'
          ..fill = Colors.orange,
      )
      ..addText(
        SvgText()
          ..addString('test string')
          ..x = '100'
          ..y = '50'
          ..textAnchor = TextAnchorValue.middle,
      );

    return MaterialApp(
      home: Scaffold(body: Center(child: SvgPicture.string(svg.toString()))),
    );
  }
}
1
likes
160
points
293
downloads

Publisher

unverified uploader

Weekly Downloads

Package that helps with svg creation. After creating an svg object user can add elements and modify their attributes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on svg_maker