build method

Widget build(
  1. State<StatefulWidget> state,
  2. Notification notification,
  3. Post? post
)

Implementation

Widget build(
  State state,
  notice.Notification notification,
  Post? post,
) {
  this.state = state;
  this.notification = notification;
  this.post = post;
  switch (notification.reason) {
    case "follow":
      return follow;
    case "like":
      return like;
    case "reply":
      return reply;
    case "repost":
      return repost;
    case "quote":
      return avatarContent(body(post!));
    case "mention":
      return avatarContent(body(post!));
    default:
      return error;
  }
}