IButton constructor
const
IButton({
- Key? key,
- required bool enableAnimation,
- Color buttonColor = neuDefault1,
- Color shadowColor = neuShadow,
- Color borderColor = neuBlack,
- GestureTapCallback? onPressed,
- BorderRadius? borderRadius,
- Offset offset = neuOffset,
- double buttonHeight = 50,
- double buttonWidth = 50,
- double shadowBlurRadius = neuShadowBlurRadius,
- double borderWidth = neuBorder,
- int animationDuration = 100,
- 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,
});