curved_gradient 0.2.1 copy "curved_gradient: ^0.2.1" to clipboard
curved_gradient: ^0.2.1 copied to clipboard

outdated

Generate a gradient using a custom curve function

Generate a gradient using a custom curve function.

demo1

demo2

Usage #

Container(
  decoration: BoxDecoration(
    gradient: CurvedGradient(
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter,
      colors: [Colors.grey, Colors.transparent],
      granularity: 10,
      curveGenerator: (x) => pow(sin(x * 10), 2).toDouble(),
    ),
  ),
)
8
likes
0
pub points
56%
popularity

Publisher

unverified uploader

Generate a gradient using a custom curve function

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on curved_gradient