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

Generate a gradient using a custom curve function. Can be used in place of `LinearGradient`.

Generate a gradient using a custom curve function.


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
160
pub points
58%
popularity

Publisher

unverified uploader

Generate a gradient using a custom curve function. Can be used in place of `LinearGradient`.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on curved_gradient