decoration_flags 0.1.0 copy "decoration_flags: ^0.1.0" to clipboard
decoration_flags: ^0.1.0 copied to clipboard

A lightweight, highly customizable Flutter widget to draw decorative hanging flags, flowers, and text banners along curved ropes using CustomPaint.

decoration_flags #

A highly customizable package to draw festive hanging flags, flowers, or text bunting along a curved rope. Perfect for birthdays, holidays, or adding a "craft" feel to your UI.

Preview #

Decoration Flags Demo

Feature #

  • Choose between classic triangles flags, stylized flowers, or alphabetical bunting.
  • Control colors, item counts, and rope properties.
  • Support for multiple arches.

Usage #

Classic Triangles: The most common "bunting" style. You can pass a custom list of colors to cycle through.

import 'package:decoration_flags/decoration_flags.dart';

DecorationFlags.triangles(
 count: 12,
 sag: 50,
 totalArches: 1,
 colors: [Colors.red, Colors.blue, Colors.yellow],
)

Text Bunting: Perfect for "Happy Birthday" or "Sale" banners. Each character is placed on its own flag.

DecorationFlags.text(
 text: "PARTY",
 sag: 40,
 flagColors: [Colors.purple, Colors.pinkAccent],
)

Hanging Flowers: Choose your style, highly customizable flowers along a curved rope.

DecorationFlags.flowers(
 count: 8,
 petalColor: Colors.orange,
 centerColor: Colors.white,
 ropeColor: Colors.green,
 sag: 30,
)

How it works #

It uses a Quadratic Bézier Curve to simulate a natural rope sag. The widget then samples this mathematical path at precise intervals to ensure that decorations are spaced evenly and rotated to match the curve's slope.

Features and bugs #

Please feel free to:

2
likes
160
points
90
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight, highly customizable Flutter widget to draw decorative hanging flags, flowers, and text banners along curved ropes using CustomPaint.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on decoration_flags