Last updated:
0 purchases
gradients button
Gradient Button #
Gradient button package lets you add a beautiful gradient to a button in your Flutter app.
Installation #
Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
gradient_button: ^0.0.1
copied to clipboard
Import the package and use it in your Flutter App.
import 'package:gradient_button/gradient_button.dart';
copied to clipboard
Example #
There are a number of properties that you can modify:
Button Text
width
Button Padding
Button TextStle
gradient (color1 and color2),
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GradientButtton(
width: MediaQuery.sizeOf(context).width,
buttonText: "Continue",
buttonTextStyle: TextStyle(color: Colors.white, fontSize: 16),
colors: [Colors.red, Colors.green, Colors.blue],
buttonPadding: EdgeInsets.symmetric(vertical: 15),
onTap: () {},
)
],
),
),
);
}
}
copied to clipboard
Next Goals #
✅ Add more properties to the package..
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.