pattern_box 0.3.5 copy "pattern_box: ^0.3.5" to clipboard
pattern_box: ^0.3.5 copied to clipboard

A collection of patterned background in Flutter using Custom Painter

🎨 pattern_box #

pattern_box is a Flutter package packed with a collection of eye-catching custom painter-based patterns β€” perfect for backgrounds, decorations, and dynamic UI elements.


πŸš€ Features #

  • 🧩 15+ built-in pattern painters
  • 🎯 Customizable properties like color, gap, thickness, and alignment
  • πŸ–ΌοΈ Easy integration with CustomPaint
  • πŸ§ͺ Example app included with previews
  • πŸ“¦ Lightweight and ready for production use

πŸ“¦ Available Patterns #

Here’s the current collection of prebuilt patterns:

Pattern Name Description
StripePattern Horizontal, vertical, diagonal stripes
HoneyCombPainter Classic beehive hexagon grid
ConcentricCircleWavePainter Radiating circle waves
ConcentricDottedCirclePainter Dotted radial symmetry
ConcentricPolygonPainter Polygons growing outward
ConcentricCirclePainter Simple concentric circle rings
WavePainter Smooth sine-style wave patterns
DottedWavePainter Wavy paths made from dots
DotsPainter Grid of dots
DiamondPainter Criss-crossing diamond pattern
GridPainter Square tile grid
CheckerboxPainter Classic checkerboard
PlusPainter Repeating plus (+) signs
CircularPainter Magic Circular Pattern
WebMatrixPainter Geometric net-like web pattern
MossaicPainter Mossaic Pattern with different shades
IsomatricGrid Isomatric grid Pattern outline
IsomatricGrid3D Isomatric grid 3D Pattern with depth effect

For AnimatedPatterns #

  • We need to wrap patterns with AnimatedPatternBuilder
  • And set repaint=true inside pattern
AnimatedPatternBuilder(
        repeat: true,
        patterBuiilder: (value) {
          final scale = 1 + 0.2 * value;
          final rotation = value * 3.14;
          return Transform.scale(
            scale: scale,
            child: Transform.rotate(
              angle: rotation,
              child: patternBox(
                context,
                WebMatrixPainter(repaint: true, gap: 10 + value * 5),
              ),
            ),
          );
        },
      ),

πŸ§ͺ Example App #

This package includes a sample app to preview all patterns.

Run it with:

flutter pub get
flutter run --example
3
likes
0
points
230
downloads

Publisher

verified publisherwaygosquad.com

Weekly Downloads

A collection of patterned background in Flutter using Custom Painter

Repository (GitHub)
View/report issues

Topics

#canvas #background #painter #pattern #decoration

License

unknown (license)

Dependencies

flutter

More

Packages that depend on pattern_box