LiquidContainer constructor
const
LiquidContainer({})
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,
});