fromJson static method

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

Implementation

static Emoji fromJson(Map<String, dynamic> json) {
  return Emoji(
    id: json['id'],
    name: json['name'],
    // TODO find a better way
    roles: json['roles'] != null ? List<String>.from(json['roles']) : null,
    user: ifNotNull(User.fromJson, json['user']),
    requireColons: json['require_colons'],
    managed: json['managed'],
    animated: json['animated'],
    available: json['available'],
  );
}