我正在使用drawDRRect
绘制矩形,并希望内部颜色Colors.green
,外部颜色Colors.blue
如何控制Paint()
?
canvas.drawDRRect(
RRect.fromRectAndCorners(
Rect.fromLTWH(
0,
0,
context.size.width,
36,
),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10),
topLeft: Radius.circular(10),
topRight: Radius.circular(10)),
RRect.fromRectAndCorners(
Rect.fromLTRB(canvasStartPosition.dx, 0, canvasEndPosition.dx, 0)),
Paint()..color = Colors.green);
canvas.drawRRect(
RRect.fromRectAndCorners(
Rect.fromLTRB(
0,
0,
canvasStartPosition.dx,
36,
),
bottomLeft: Radius.circular(10),
topLeft: Radius.circular(10),
),
new Paint()..color = Colors.blue);
canvas.drawRRect(
RRect.fromRectAndCorners(
Rect.fromLTRB(
canvasStartPosition.dx,
0,
canvasEndPosition.dx,
36,
),
),
new Paint()..color = Colors.green);
canvas.drawRRect(
RRect.fromRectAndCorners(
Rect.fromLTRB(
canvasEndPosition.dx,
0,
context.size.width,
36,
),
bottomLeft: Radius.circular(10),
topLeft: Radius.circular(10),
),
new Paint()..color = Colors.blue);