TextRenderable constructor

TextRenderable({
  1. required String text,
  2. TextStyle? textStyle,
  3. TextAlign textAlign = TextAlign.center,
  4. Offset position = Offset.zero,
  5. double rotation = 0.0,
  6. double scale = 1.0,
  7. int layer = 0,
  8. int zOrder = 0,
  9. bool visible = true,
  10. double opacity = 1.0,
})

Create a text renderable

Implementation

TextRenderable({
  required this.text,
  TextStyle? textStyle,
  this.textAlign = TextAlign.center,
  super.position,
  super.rotation,
  super.scale,
  super.layer,
  super.zOrder,
  super.visible,
  super.opacity,
}) : textStyle =
         textStyle ?? const TextStyle(color: Colors.white, fontSize: 16);