This commit is contained in:
toly
2023-12-11 21:53:27 +08:00
parent 838d6aa668
commit 25e51d789f
104 changed files with 6414 additions and 19 deletions

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;
}