我已经创建了一个圆形按钮,在本例中是RawMaterialButton
,我试图使用CustomPaint
在它的中心创建一个三角形,但它说明ShapesPainter
没有为类ClearButton'. I tried other buttons but couldn't get any of them to accept
ShapePainter`定义.
RawMaterialButton(
child: CustomPaint(
painter: ShapesPainter(),
child: Container(
height: 40,
),
),
onPressed: onPressed,
constraints: BoxConstraints.tightFor(
width: 90.0,
height: 90.0,
),
shape: RoundedRectangleBorder(),
fillColor: Colors.transparent,
)
ShapesPainter
应该使用哪种类型的按钮,或者我如何创建中心带有三角形或其他形状的圆形按钮?
这是我试图创建的按钮,如您所见,它基本上是一个带三角形的圆形按钮.