v0.3.0flutter_shapes
Paint various shapes on canvas.
52Likes 13330-day downloads115Pub points
AndroidiOSWebmacOSWindowsLinux
Paint various shapes on canvas with Flutter CustomPainter
{"sdk":"flutter"}{"sdk":"flutter"}English project snapshot. Visit GitHub for the latest content.
https://github.com/tnantoka/flutter_shapes/raw/master/heart.gif https://github.com/tnantoka/flutter_shapes/raw/master/star.gif https://github.com/tnantoka/flutter_shapes/raw/master/rotate.gif
Live demo powered by Flutter for web.
https://github.com/tnantoka/flutter_shapes/raw/master/screenshot.png
dependencies:
flutter:
sdk: flutter
flutter_shapes:
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
}
}
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.