TextComponent constructor
TextComponent(
- String text, {
- Color? color,
- bool? bold,
- bool? underlined,
- bool? italic,
- bool? strikethrough,
- bool? obfuscated,
- TextClickEvent? clickEvent,
- TextHoverEvent? hoverEvent,
- String? insertion,
In Minecraft text in the chat or as title is defined with JSON-data. objD makes the JSON part of it easier by utilizing the TextComponent Class:
Implementation
TextComponent(
String text, {
this.color,
this.bold,
this.underlined,
this.italic,
this.strikethrough,
this.obfuscated,
this.clickEvent,
this.hoverEvent,
this.insertion,
}) : value = {'text': text};