fromJson static method

Template fromJson(
  1. Map<String, dynamic> json
)

Implementation

static Template fromJson(Map<String, dynamic> json) {
  return Template(
    code: json['code'],
    name: json['name'],
    description: json['description'],
    usageCount: json['usage_count'],
    creatorId: json['creator_id'],
    creator: User.fromJson(json['creator']),
    createdAt: json['created_at'],
    updatedAt: json['updated_at'],
    sourceGuildId: json['source_guild_id'],
    serializedSourceGuild: Guild.fromJson(json['serialized_source_guild']),
    isDirty: json['is_dirty'],
  );
}