flutter_shapes 0.2.1
flutter_shapes: ^0.2.1 copied to clipboard

Flutter Android iOS web

Paint various shapes on canvas.

FlutterShapes #

Live demo powered by Flutter for web.

Shape types #

Adding FlutterShapes to your project #

    sdk: flutter

Drawing a Shape #

import 'package:flutter_shapes/flutter_shapes.dart';

class MyPainter extends CustomPainter {
  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

Acknowledgements #


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