我已经创建了一个圆形按钮,在这种情况下RawMaterialButton,我正尝试使用CustomPaint它在其中心创建一个三角形,但这ShapesPainter并不是为ClearButton'. I tried other buttons but couldn't get any of them to acceptShapesPainter 类定义的。
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,
)
Run Code Online (Sandbox Code Playgroud)
应该使用哪种按钮类型?ShapesPainter或者如何创建一个中心为三角形或其他形状的圆形按钮?
这是我尝试创建的按钮,如您所见,它基本上是一个带有三角形的圆形按钮。