ajilo297 / Flutter-Dotted-Border

A Flutter package to easily add dashed borders around widgets
https://pub.dev/packages/dotted_border
MIT License
297 stars 62 forks source link

Define radius for each corner? #21

Open pzehle opened 2 years ago

pzehle commented 2 years ago

Any idea on how to define the radius for each one of the corners?

tronghuy5555 commented 12 months ago
DottedBorder(
   customPath: (size) {
       return Path()
         ..addRRect(
               borderRadius
                                    .resolve(Directionality.of(context))
                                    .toRRect(
                                      Rect.fromLTRB(
                                          0, 0, size.width, size.height),
                                    ),
                              );
                          },
                          child: [Your child],
);

ScreenShot 2023-10-30 at 11 47 10@2x

Please use custompath to custom border radius you want.