NeoPopTiltedButton class

A neopop design tilted button.

A NeoPopTiltedButton is a custom painted button with a shadow and a plunk. NeoPopTiltedButtonDecoration is used to paint the button. The shimmer layer forms the top layer of the button. The color layer is painted below it along with border. The shadow is painted at the last.

  • If showShimmer is set to true, the shimmer layer is painted.
  • If onTapUp is null or enabled is set to false, the button will be disabled.
  • If color is provided, default decoration with this color will be used to paint the button.

{@tool snippet}

The following sample code shows a basic NeoPopTiltedButton:

NeoPopTiltedButton(
  decoration: NeoPopTiltedButtonDecoration(
    color: Colors.white,
    plunkColor: Colors.grey,
  ),
  child: Padding(
    padding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 45),
    child: Text('CRED'),
  ),
)

{@end-tool}

See also:

Inheritance

Constructors

NeoPopTiltedButton({Key? key, required Widget child, bool isFloating = false, bool enabled = true, Color? color, NeoPopTiltedButtonDecoration? decoration, double? shadowDistance, double? buttonDepth, Duration? tapDuration, Duration? floatingDuration, Duration? floatingDelay, double? yPosFactor, VoidCallback? onTapUp, VoidCallback? onTapDown})
Create a neopop tilted button.
const

Properties

buttonDepth double?
The depth of the tilted button
final
child Widget
The widget below this widget in the tree.
final
color Color?
Color of the button
final
decoration NeoPopTiltedButtonDecoration?
The decoration to paint the button.
final
enabled bool
Whether the button is enabled
final
floatingDelay Duration?
The delay between two floating cycles.
final
floatingDuration Duration?
The duration of the floating animation. One floating cycle i.e to-and-fro movement of the button and shadow accounts for two floating durations.
final
hashCode int
The hash code for this object.
no setterinherited
isFloating bool
Is the button floating
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTapDown VoidCallback?
A pointer that might cause a tap with a neopop button has contacted the screen at a particular location.
final
onTapUp VoidCallback?
A pointer that will trigger a tap with a neopop button has stopped contacting the screen at a particular location.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowDistance double?
The maximum distance from the button at which the shadow is painted.
final
tapDuration Duration?
The duration of the animation when button is pressed or released
final
yPosFactor double?
Factor that defines the floating positions of buttons and shadow along vertical-axis.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<NeoPopTiltedButton>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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