NeoPopTiltedButton constructor

const NeoPopTiltedButton({
  1. Key? key,
  2. required Widget child,
  3. bool isFloating = false,
  4. bool enabled = true,
  5. Color? color,
  6. NeoPopTiltedButtonDecoration? decoration,
  7. double? shadowDistance,
  8. double? buttonDepth,
  9. Duration? tapDuration,
  10. Duration? floatingDuration,
  11. Duration? floatingDelay,
  12. double? yPosFactor,
  13. VoidCallback? onTapUp,
  14. 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);