TextComponent.score constructor

TextComponent.score(
  1. Score score, {
  2. Color? color,
  3. bool? bold,
  4. bool? italic,
  5. bool? underlined,
  6. bool? strikethrough,
  7. bool? obfuscated,
  8. TextClickEvent? clickEvent,
  9. TextHoverEvent? hoverEvent,
  10. String? insertion,
})
TextComponent.score(
	Entity.Selected(),
	objective: 'myscores',
	color:Color.Black
)
⇒ {'score':{'name': '@s','objective':'myscores'},'color':'black'}

Implementation

TextComponent.score(
  Score score, {
  this.color,
  this.bold,
  this.italic,
  this.underlined,
  this.strikethrough,
  this.obfuscated,
  this.clickEvent,
  this.hoverEvent,
  this.insertion,
}) {
  value = {
    'score': {'name': score.entity.toString(), 'objective': score.score}
  };
}