Home > Net >  Flutter - while using (dotted border package) unable to round the border (radius values are not work
Flutter - while using (dotted border package) unable to round the border (radius values are not work

Time:06-24

even after changing the radius value border still remains the same

Widget AddTask() {
  return DottedBorder(
      borderType: BorderType.Rect,
      radius: const Radius.circular(30),
      dashPattern: const [10, 10],
      color: Colors.grey,
      strokeWidth: 2,
      child: const Center(
        child: Text(
          "  Add",
          style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
        ),
      ));
}

CodePudding user response:

Use borderType: BorderType.RRect, instead of borderType: BorderType.Rect, please note Rect has an R prefix. R stands for rounded.

  • Related