v0.3.0flutter_shapes
在画布上绘制各种形状。
52喜欢 228近 30 天下载115Pub 分数
AndroidiOSWebmacOSWindowsLinux
使用 Flutter CustomPainter 在画布上绘制各种形状
以下为英文项目原文快照,最新内容请访问 GitHub。


Live demo powered by Flutter for web.
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.
依赖清单 2 项
{"sdk":"flutter"}{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗