TextDrawable constructor
TextDrawable({
- Key? key,
- required String text,
- double height = 48,
- double width = 48,
- TextStyle? textStyle,
- Color? backgroundColor,
- BoxShape boxShape = BoxShape.circle,
- BorderRadiusGeometry? borderRadius,
- Duration duration = const Duration(milliseconds: 500),
- bool isTappable = false,
- bool isSelected = false,
- dynamic onTap()?,
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",
);
}