liquid_wave_animate_button 0.0.1
liquid_wave_animate_button: ^0.0.1 copied to clipboard
A Flutter package that provides a customizable liquid wave animate button with dynamic liquid fill effects for modern UIs.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:liquid_wave_animate_button/liquid_wave_animate_button.dart';
void main() => runApp(const Homepage());
class Homepage extends StatelessWidget {
const Homepage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Liquid Fill Button Example',
home: Scaffold(
backgroundColor: Colors.black87,
body: Center(
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
LiquidWaveAnimateButton(
buttonName: 'Liquid Wave',
width: 250,
height: 70,
fillLevel: 0.2,
liquidColor: Colors.pink,
ariseAnimation: true,
ariseDuration: const Duration(seconds: 3),
borderColor: Colors.white,
borderWidth: 2.0,
textStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
backgroundColor: Colors.grey.shade900,
onPressed: () {
print("Button pressed!");
},
),
SizedBox(height: 30),
LiquidWaveAnimateButton(
buttonName: 'Liquid Wave',
width: 250,
height: 70,
fillLevel: 0.5,
liquidColor: Colors.red,
ariseAnimation: true,
ariseDuration: const Duration(seconds: 3),
borderColor: Colors.red,
borderWidth: 2.0,
textStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
backgroundColor: Colors.grey.shade900,
onPressed: () {
print("Button pressed!");
},
),
SizedBox(height: 30),
LiquidWaveAnimateButton(
buttonName: 'Liquid Wave',
width: 250,
height: 70,
fillLevel: 0.8,
liquidColor: Colors.green,
ariseAnimation: true,
ariseDuration: const Duration(seconds: 3),
borderColor: Colors.green,
borderWidth: 2.0,
textStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
backgroundColor: Colors.grey.shade900,
onPressed: () {
print("Button pressed!");
},
),
SizedBox(height: 30),
LiquidWaveAnimateButton(
buttonName: 'Liquid Wave',
width: 250,
height: 70,
fillLevel: 1.1,
liquidColor: Colors.lightBlueAccent,
ariseAnimation: true,
ariseDuration: const Duration(seconds: 3),
borderColor: Colors.lightBlueAccent,
borderWidth: 2.0,
textStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
backgroundColor: Colors.grey.shade900,
onPressed: () {
print("Button pressed!");
},
),
]),
),
),
);
}
}