TextDrawable constructor

TextDrawable({
  1. Key? key,
  2. required String text,
  3. double height = 48,
  4. double width = 48,
  5. TextStyle? textStyle,
  6. Color? backgroundColor,
  7. BoxShape boxShape = BoxShape.circle,
  8. BorderRadiusGeometry? borderRadius,
  9. Duration duration = const Duration(milliseconds: 500),
  10. bool isTappable = false,
  11. bool isSelected = false,
  12. dynamic onTap(
    1. bool
    )?,
})

Creates a customizable TextDrawable widget.

Implementation

TextDrawable({
  Key? key,
  required this.text,
  this.height = 48,
  this.width = 48,
  this.textStyle,
  this.backgroundColor,
  this.boxShape = BoxShape.circle,
  this.borderRadius,
  this.duration = const Duration(milliseconds: 500),
  this.isTappable = false,
  this.isSelected = false,
  this.onTap,
}) : super(key: key) {
  assert(
    boxShape == BoxShape.rectangle || borderRadius == null,
    "Set boxShape = BoxShape.rectangle when borderRadius is specified",
  );
  assert(
    onTap == null || isTappable,
    "isTappable must be true to receive onTapped callback",
  );
}