FlutterTextButton3D constructor

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

A customizable neubrutalist-style text button.

The button has a text label, 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;

// ignore: use_super_parameters
const FlutterTextButton3D({
  super.key,
  required enableAnimation,
  required this.text,
  super.animationDuration,
  super.borderColor,
  super.borderRadius,
  super.borderWidth,
  super.buttonColor,
  super.buttonHeight,
  super.buttonWidth = 100,
  super.offset,
  super.onPressed,
  super.shadowBlurRadius,
  super.shadowColor,
}) : super(
        child: text,
        enableAnimation: enableAnimation,
      );