0

I am using drawDRRect for drawing rectangle, and want that inner color will be Colors.green and outer color Colors.blue how can I control 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);
esfsef
  • 193
  • 3
  • 11

1 Answers1

0
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);
esfsef
  • 193
  • 3
  • 11