flutter_gradient_button 0.0.1 copy "flutter_gradient_button: ^0.0.1" to clipboard
flutter_gradient_button: ^0.0.1 copied to clipboard

this simple gradient button widget

gradient_button #

A Flutter package to create customizable gradient buttons.

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  gradient_button: ^1.0.0

You can install packages from the command line:

flutter pub get

Usage #

Import the package:

import 'package:gradient_button/gradient_button.dart';

Use the GradientButton widget:

GradientButton(
  colors: [Colors.blue, Colors.green],
  height: 50,
  width: 200,
  radius: 25,
  gradientDirection: GradientDirection.leftToRight,
  textStyle: TextStyle(color: Colors.white),
  text: "Click me",
  onPressed: () {
    print("Button clicked");
  },
),

You can customize the colors, height, width, radius, gradient direction, text style, and text of the button. You can also provide an onPressed callback to handle button clicks.

Example #

To run the example project, clone the repo, and run flutter run in the example directory. smartmockups_lhm6pgt5

License #

This project is licensed under the MIT License - see the LICENSE file for details.

0
likes
130
pub points
68%
popularity

Publisher

unverified uploader

this simple gradient button widget

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_gradient_button