This commit is contained in:
toly
2023-12-16 12:40:32 +08:00
parent ab2778a22b
commit 01fdf966c5
593 changed files with 8995 additions and 27753 deletions

29
assets/draw/p01/s01.dart Normal file
View File

@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
class Paper extends StatelessWidget {
const Paper({super.key});
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: CustomPaint( // 使用CustomPaint
painter: PaperPainter(),
),
);
}
}
class PaperPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
// 创建画笔
final Paint paint = Paint();
// 绘制圆
canvas.drawCircle(Offset(100, 100), 10, paint);
}
@override
bool shouldRepaint(CustomPainter oldDelegate) => false;
}