toHtml method

  1. @override
String toHtml()
override

Returns an HTML representation of the element

Implementation

@override
String toHtml() {
  String twitterPartial = twitter != null
      ? Reference.external(
              text: "@$twitter", link: "https://twitter.com/$twitter")
          .toHtml()
      : "";
  return '<article id="author-${slugify(email)}">'
      '<h1>$name</h1>'
      '<h2>${Reference.external(text: email, link: "mailto:$email").toHtml()}</h2>'
      '$twitterPartial'
      '</article>';
}