LiquidEffect constructor

const LiquidEffect({
  1. double speed = 1.0,
  2. double viscosity = 0.5,
  3. List<Color> colors = const [Color(0xFF9C27B0), Color(0xFF2196F3), Color(0xFF00BCD4)],
})

Creates a LiquidEffect.

speed controls the animation speed (default 1.0). viscosity controls how thick/fluid the liquid looks, from 0.0 (thin) to 1.0 (thick, default 0.5). colors defines the color palette blended by the waves (default: purple, blue, cyan).

Implementation

const LiquidEffect({
  this.speed = 1.0,
  this.viscosity = 0.5,
  this.colors = const [
    Color(0xFF9C27B0), // purple
    Color(0xFF2196F3), // blue
    Color(0xFF00BCD4), // cyan
  ],
});