Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

A 3D pushable button built in Flutter. Ideal for important CTAs in the app.

License

Notifications You must be signed in to change notification settings

stephenrichter/pushable_button

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pushable Button

Pub Language License Twitter

A 3D pushable button built in Flutter. Ideal for important CTAs in the app.

PushableButton preview

Usage

PushableButton(
  child: Text('ENROLL NOW', style: someTextStyle),
  height: 60,
  elevation: 8,
  hslColor: HSLColor.fromAHSL(1.0, 120, 1.0, 0.37),
  shadow: BoxShadow(
    color: Colors.grey.withOpacity(0.5),
    spreadRadius: 5,
    blurRadius: 7,
    offset: Offset(0, 2),
  ),
  borderRadius: 16,
  onPressed: () => print('Button Pressed!'),
)

Configurable Properties

  • child: child widget (normally a Text or Icon)
  • height: height of the top layer
  • elevation: elevation or "gap" between the top and bottom layer
  • hslColor: color of the top layer. HSLColor is used instead of Color so that the bottom layer is automatically calculated by reducing the luminosity
  • shadow: an optional shadow to make the button look better
  • borderRadius: an optional border radius for the button corners
  • onPressed: button callback

About

A 3D pushable button built in Flutter. Ideal for important CTAs in the app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 78.2%
  • HTML 11.6%
  • Swift 8.9%
  • Other 1.3%