NeoPopTiltedButton constructor
const
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.
By default the button is enabled and non-floating. If onTapUp is null,
the button will be in disabled state.
The color and decoration arguments cannot both be supplied, since
it would potentially result in the decoration drawing over the background
color. To supply a decoration with a color, use decoration: NeoPopTiltedButtonDecoration(color: color).
If color is provided then a default decoration with that color is applied
to the button.
Implementation
const NeoPopTiltedButton({
Key? key,
required this.child,
this.isFloating = false,
this.enabled = true,
this.color,
this.decoration,
this.shadowDistance,
this.buttonDepth,
this.tapDuration,
this.floatingDuration,
this.floatingDelay,
this.yPosFactor,
this.onTapUp,
this.onTapDown,
}) : assert(
color == null || decoration == null,
'Cannot provide both a color and a decoration\n'
'To provide both, use "decoration: NeoPopTiltedButtonDecoration(color: color)".',
),
super(key: key);