Item constructor

Item(
  1. ItemResponse response,
  2. dynamic client
)

Creates an Item from a protobuf response.

Implementation

Item(pb.ItemResponse response, dynamic client) : super(client) {
  kref = Kref(response.kref.uri);
  name = response.name;
  itemName = response.itemName;
  kind = response.kind;
  createdAt = response.createdAt.isEmpty ? null : response.createdAt;
  author = response.author;
  metadata = Map<String, String>.from(response.metadata);
  deprecated = response.deprecated;
  username = response.username;
}