我正在使用flv中的svg路径制作用于构建地图的演示。但是,某些部分不可点击。不知道为什么吗 谁能提供解决方案和理由。
这是pathpaint代码。
class PathPainter extends CustomPainter {
final Province _province;
PathPainter(this._province);
@override
void paint(Canvas canvas, Size size) {
Path path = getPathByProvince(_province);
canvas.drawPath(
path,
Paint()
..style = PaintingStyle.stroke
..color = Colors.black
..strokeWidth = 2.0);
}
@override
bool shouldRepaint(PathPainter oldDelegate) => true;
@override
bool shouldRebuildSemantics(PathPainter oldDelegate) => false;
}
class PathClipper extends CustomClipper<Path> {
final Province _province;
PathClipper(this._province);
@override
Path getClip(Size size) {
return getPathByProvince(_province);
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}
检查所有代码
我正在关注一个github项目。检查here
输出: