LiquidContainer constructor

const LiquidContainer({
  1. Key? key,
  2. required Options optionsParam,
  3. double forceFactorTempBuild = 7,
  4. bool isShowTouchBuild = false,
  5. BoxDecoration? boxDecorationLabel,
  6. void onTap()?,
  7. Widget? child,
})

LiquidContainer - Liquid button container with Hover effect. Easily add liquid effect to your application

  • Example of a Minimum Liquid Effect Setting
  final options = Options(
    layers: [
      LayerModel(
        points: [],
        viscosity: 0.9,
        touchForce: 30,
        forceLimit: 15,
        color: const Color(0xFF00FF00),
      ),
    ],
    gap: 15,
    noise: 5,
    forceFactorBuild: 10,
    forceFactorOnTap: 150,
  );

  • Use
Widget _buildLiquidButton() {
  return LiquidContainer(
    onTap: () {
      // same code
    },
    optionsParam: options,
    child: const SizedBox(
      height: 80,
      width: 300,
    ),
  );
}

Implementation

const LiquidContainer({
  super.key,
  required this.optionsParam,
  this.forceFactorTempBuild = 7,
  this.isShowTouchBuild = false,
  this.boxDecorationLabel,
  this.onTap,
  this.child,
});