generate method
Implementation
@override
Widget generate(Context context) {
if (context.prod) return Comment.Null();
var text = TextComponent('undefined');
if (msg is num || msg is bool) text = TextComponent(msg.toString());
if (msg is String) text = TextComponent(msg as String);
if (msg is Score) text = TextComponent.score(msg as Score);
if (msg is Entity) text = TextComponent.selector(msg as Entity);
return Tellraw(to!, show: [
TextComponent(
'[${_type.name}] ',
color: color,
bold: _type == _LogType.DEBUG ? true : null,
),
if (desc != null) TextComponent('$desc '),
text
]);
}