whiplashoo / patterns_canvas

A Flutter package that lets you draw patterns like stripes or dots on canvas elements.
MIT License
20 stars 6 forks source link

Are you using this in your apps? Would love to learn how! #1

Open whiplashoo opened 2 years ago

whiplashoo commented 2 years ago

As this package is getting likes and starts, I am genuinely curious of why and how people are using it.

So, if you use this in your Flutter app and have the time, please share here how you are using it or any screenshot from your app. It would help immensely in order to get ideas for future features and enhancements.

herrmonkey commented 1 year ago

I love your package, but either because I'm not a native English speaker or because I don't understand the documentation properly, I don't see a way to give more space between pattern elements.

To be clearer, I want to replicate this...

Captura de Pantalla 2022-12-02 a las 2 50 37 p m

and I should keep the dots small but the space between them wider

Captura de Pantalla 2022-12-02 a las 2 50 55 p m

Greetings from Colombia, and thanks for your work.

whiplashoo commented 1 year ago

Hi, greeting from Greece.

Currently, you cannot set the spacing between the pattern features. The best you can get is by using the SubtlePatch pattern, increase the featuresCount property, and paint it on the whole canvas:

class MyPainter extends CustomPainter {
  final BuildContext context;

  MyPainter(this.context);

  @override
  void paint(Canvas canvas, Size size) {
    SubtlePatch( bgColor: Colors.white, fgColor: Colors.blueGrey, featuresCount: 80)
            .paintOnCanvas(canvas, size);
 }
}

You will get this pattern:

However, you can always fork this project and customize the pattern painting process, if you want!