NeoPopTiltedButtonDecoration class

An immutable description of how a neopop tilted button is painted.

The NeoPopTiltedButtonDecoration class provides a variety of ways to draw a neopop tilted button.

The tilted button is painted in layers. The top-most layer after child is composed of shimmer. Shimmer is painted if showShimmer is set to true,

After painting shimmer, the color layer is painted.

The border paints over the body; the shadow, naturally, paints below it.

{@tool snippet}

The following applies a NeoPopTiltedButtonDecoration to a NeoPopTiltedButton widget with a shimmer.

NeoPopTiltedButton(
  decoration: NeoPopTiltedButtonDecoration(
    color: Colors.white,
    plunkColor: Colors.grey,
    showShimmer: true,
    border: Border.all(color: Colors.black, width: 0.5),
  ),
  child: Padding(
    padding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 45),
    child: Text('Pay Now'),
  ),
)

{@end-tool}

Constructors

NeoPopTiltedButtonDecoration({Color color = const Color(0xFF0D0D0D), Color disabledColor = kDisabledButtonColor, Color? disabledPlunkColor = kDisabledButtonPlunkColor, Color shadowColor = kTiltedButtonShadowColor, double shimmerWidth = kTiltedButtonShimmerWidth, Color shimmerColor = kTiltedButtonShimmerColor, Duration shimmerDuration = kTiltedButtonShimmerDuation, Duration shimmerDelay = kTiltedButtonShimmerDelay, bool showShimmer = false, Color? shimmerPlunkColor, Color? plunkColor, Border? border})
Creates a neopop tilted button decoration object.
const

Properties

border Border?
The border to be painted around the button.
final
color Color
Color of the button
final
disabledColor Color
Color of the button in disabled state
final
disabledPlunkColor Color?
Color of the plunk of the button in disabled state
final
hashCode int
The hash code for this object.
no setterinherited
plunkColor Color?
Color of the bottom plunk of the button
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color
Color of the shadow of the button
final
shimmerColor Color
Color of the shimmer
final
shimmerDelay Duration
Delay between two shimmer cycles
final
shimmerDuration Duration
Duration of one shimmer cycle
final
shimmerPlunkColor Color?
Color of the plunk of the shimmer
final
shimmerWidth double
Width of the larger shimmer line The width of the smaller line is calculated as shimmerWidth / 2.
final
showShimmer bool
Whether to show the shimmer over the button
final

Methods

copyWith({Color? color, Color? disabledColor, Color? disabledPlunkColor, Color? shadowColor, double? shimmerWidth, Color? shimmerColor, Duration? shimmerDuration, Duration? shimmerDelay, bool? showShimmer, Color? shimmerPlunkColor, Border? border}) NeoPopTiltedButtonDecoration
Creates a copy of this object but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited