IButton constructor

const IButton({
  1. Key? key,
  2. required bool enableAnimation,
  3. Color buttonColor = neuDefault1,
  4. Color shadowColor = neuShadow,
  5. Color borderColor = neuBlack,
  6. GestureTapCallback? onPressed,
  7. BorderRadius? borderRadius,
  8. Offset offset = neuOffset,
  9. double buttonHeight = 50,
  10. double buttonWidth = 50,
  11. double shadowBlurRadius = neuShadowBlurRadius,
  12. double borderWidth = neuBorder,
  13. int animationDuration = 100,
  14. required Widget? child,
})

A customizable neubrutalist-style button.

The button has a customizable background color, border color, and drop shadow. The button's shape can also be customized with a rounded border radius. The button's behavior is specified with an onPressed callback function.

This button is built using Flutter's Material widget, and is designed to follow the Neubrutalism UI style guidelines.

*Constants

  • const neuBlack = Colors.black;

  • const neuDefault1 = Colors.teal;

  • const neuShadow = Color(0xFF080808);

  • const neuBorder = 3.0;

  • const neuShadowBlurRadius = 0.0;

  • const neuOffset = Offset(4, 4);

  • const neuBlurStyle = BlurStyle.solid;

Implementation

///   - const neuBlack = Colors.black;
///   - const neuDefault1 = Colors.teal;
///   - const neuShadow = Color(0xFF080808);
///
///   - const neuBorder = 3.0;
///   - const neuShadowBlurRadius = 0.0;
///
///   - const neuOffset = Offset(4, 4);
///   - const neuBlurStyle = BlurStyle.solid;

const IButton({
  super.key,
  required this.enableAnimation,
  this.buttonColor = neuDefault1,
  this.shadowColor = neuShadow,
  this.borderColor = neuBlack,
  this.onPressed,
  this.borderRadius,
  this.offset = neuOffset,
  this.buttonHeight = 50,
  this.buttonWidth = 50,
  this.shadowBlurRadius = neuShadowBlurRadius,
  this.borderWidth = neuBorder,
  this.animationDuration = 100,
  required this.child,
});