PinButton constructor

PinButton({
  1. TextStyle? textStyle,
  2. TextStyle? onHoverTextStyle,
  3. ButtonSettings? settings,
  4. ButtonSettings? onHoverSettings,
  5. Duration? duration = const Duration(milliseconds: 250),
  6. Key? key,
})
  • textStyle Main textStyle for button
  • onHoverTextStyle TextStyle for over state
  • settings Main sttings for button
  • onHoverSettings Settings for over state
  • duration Animation duration

Implementation

PinButton({
  TextStyle? textStyle,
  TextStyle? onHoverTextStyle,
  ButtonSettings? settings,
  ButtonSettings? onHoverSettings,
  super.duration = const Duration(milliseconds: 250),
  super.key,
}) :
super(
  textStyle       : textStyle,
  onHoverTextStyle: onHoverTextStyle == null ? textStyle : onHoverTextStyle,
  settings:
  ButtonSettings(
    width         : settings?.width      == null ? 50 : settings!.width,
    height        : settings?.height     == null ? 50 : settings!.height,
    padding       : settings?.padding,
    margin        : settings?.margin,
    alignment     : settings?.alignment  == null ? Alignment.center : settings!.alignment,
    color         : settings?.color,
    gradient      : settings?.gradient,
    image         : settings?.image,
    border        : settings?.border,
    borderRadius  : settings?.borderRadius,
    shadow        : settings?.shadow,
  ),
  onHoverSettings: onHoverSettings == null
  ? null
  : ButtonSettings(
    width         : onHoverSettings.width         == null ? settings?.width      : onHoverSettings.width,
    height        : onHoverSettings.height        == null ? settings?.height     : onHoverSettings.height,
    padding       : onHoverSettings.padding       == null ? settings?.padding    : onHoverSettings.padding,
    margin        : onHoverSettings.margin        == null ? settings?.margin     : onHoverSettings.margin,
    alignment     : onHoverSettings.alignment     == null ? settings?.alignment??Alignment.center  : onHoverSettings.alignment,
    color         : onHoverSettings.color         == null ? settings?.color        : onHoverSettings.color,
    gradient      : onHoverSettings.gradient      == null ? settings?.gradient     : onHoverSettings.gradient,
    image         : onHoverSettings.image         == null ? settings?.image        : onHoverSettings.image,
    border        : onHoverSettings.border        == null ? settings?.border       : onHoverSettings.border,
    borderRadius  : onHoverSettings.borderRadius  == null ? settings?.borderRadius : onHoverSettings.borderRadius,
    shadow        : onHoverSettings.shadow        == null ? settings?.shadow       : onHoverSettings.shadow,
  ),

);