nice_buttons

nice_buttons a beautiful, animated, and customizable 3D button for your flutter project.

Platform Support

AndroidiOSWebMacOSLinuxWindows

Sample Image

Installation

Add it as a dependency in their pubspec.yaml:

dependencies:
  nice_buttons: ^0.0.1

Customizations

AttributeTypeDefaultDescription
startColorColor0xFF2ec8ffThe gradient start color
endColorColor0xFF529fffThe gradient end color
borderColorColor0xFF3489e9The color of the 3D border.
progressColorColorwhiteThe color of circular progress indicator, defaults to white
progressSizeDouble20The size of progress indicator circle, defaults to 20
gradientOrientationGradientOrientationHorizontalOrientation of the gradient defaults to Horizontal
borderThicknessDouble5The thickness of the 3D border, defaults to 5
heightDouble60Height of the button, defaults to 60
widthDouble200Width of the button defaults to 200, its useless if the stretch property is set to true
stretchbooltrueWhether to occupy the full available space in the parent, defaults to true
borderRadiusDouble20The border radius of the button, defaults to 20
progressboolfalseWhether the progress indicator is required or not, defaults to false
disabledboolfalseDisables the button, defaults to false
onTapFunctionButton press handler, required*
childWidgetInner content for the button, required*

Usage

...
import 'package:nice_buttons/nice_buttons.dart';
...
NiceButtons(
  stretch: true,
  gradientOrientation: GradientOrientation.Horizontal,
  onTap: (finish) {
    print('On tap called');
  },
  child: Text(
    'Full Width',
    style: TextStyle(color: Colors.white, fontSize: 18),
  ),
);

Check example folder for more examples.

Libraries

nice_buttons