Buttons include some widgets that based on existing FlatButton & RaisedButton, and also added FLGradientButton which supports gradient background and FLLoadingButton which supports loading animation.
FLFlatButton is based on FlatButton, it has a new property 'expanded' and a factory method 'icon' to specify where the icon is located in the button.
expanded:
icon:
FLRaisedButton is based on RaisedButton, it also adds 'expanded' and 'icon'. The usage is the same as FLFlatButton .
FLGradientButton supports gradient backgrounds. There are three factory methods to display different types of gradients: linear , sweep and radial .
linear
sweep
radial
FLLoadingButton controls whether to display the indicator by setting the loading property. It also provides properties to style the indicator.
text & indicator
only indicator
API property description type default value expanded expand size bool false
property description type default value iconPosition icon's position in button FLPosition spacing the space between icon and label double icon icon widget Widget label text widget Widget
property description type default value expanded expand size bool false
property description type default value iconPosition icon's position in button FLPosition spacing the space between icon and label double icon icon widget Widget label text widget Widget
property description type default value colors gradient color list List<Color> stops a list of values from 0.0 to 1.0 that denote fractions along the gradient List<double> begin the offset at which stop 0.0 of the gradient is placed AlignmentGeometry Alignment.centerLeft end the offset at which stop 1.0 of the gradient is placed AlignmentGeometry Alignment.centerRight tileMode how this gradient should tile the plane beyond in the region before TileMode TileMode.clamp
property description type default value colors gradient color list List<Color> stops a list of values from 0.0 to 1.0 that denote fractions along the gradient List<double> center the center of the gradient AlignmentGeometry Alignment.center startAngle the angle in radians at which stop 0.0 of the gradient is placed double 0.0 endAngle the angle in radians at which stop 1.0 of the gradient is placed double math.pi * 2 tileMode how this gradient should tile the plane beyond in the region before TileMode TileMode.clamp
property description type default value colors gradient color list List<Color> stops a list of values from 0.0 to 1.0 that denote fractions along the gradient List<double> center the center of the gradient AlignmentGeometry Alignment.center radius the radius of the gradient double 0.5 tileMode how this gradient should tile the plane beyond in the region before TileMode TileMode.clamp focal the focal point of the gradient AlignmentGeometry focalRadius the radius of the focal point of gradient double 0.0
property description type default value indicatorColor the color of indicator Color Theme.of(context).accentColor indicatorSize the size of indicator double indicatorOnly only show indicator or not bool false loading loading state bool false