flutter_shapes 0.3.0 copy "flutter_shapes: ^0.3.0" to clipboard
flutter_shapes: ^0.3.0 copied to clipboard

Paint various shapes on canvas.

FlutterShapes #

Live demo powered by Flutter for web.

Shape types #

Adding FlutterShapes to your project #

dependencies:
  flutter:
    sdk: flutter
  flutter_shapes:
copied to clipboard

Drawing a Shape #

import 'package:flutter_shapes/flutter_shapes.dart';

class MyPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    Paint paint = Paint()..color = Colors.black;
    Shapes shapes = Shapes(canvas: canvas, radius: 50, paint: paint, center: Offset.zero, angle: 0);

    shapes.drawCircle();                // method name
    shapes.drawType(ShapeType.Circle);  // enum
    shapes.draw('Circle');              // string
  }
}
copied to clipboard

Acknowledgements #

https://proandroiddev.com/flutter-animation-creating-mediums-clap-animation-in-flutter-3168f047421e

A great article about animation with Flutter.
It helped me to write example codes.

49
likes
140
points
180
downloads

Publisher

verified publishertnantoka.com

Weekly Downloads

2024.10.03 - 2025.04.17

Paint various shapes on canvas.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_shapes