TextComponent constructor

TextComponent(
  1. String text, {
  2. Color? color,
  3. bool? bold,
  4. bool? underlined,
  5. bool? italic,
  6. bool? strikethrough,
  7. bool? obfuscated,
  8. TextClickEvent? clickEvent,
  9. TextHoverEvent? hoverEvent,
  10. 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};