fromJson static method

User fromJson(
  1. dynamic value
)

Returns a new User instance and imports

Implementation

// ignore: prefer_constructors_over_static_methods
static User fromJson(dynamic value) {
  final json = value.cast<String, dynamic>();
  return User(
    id: mapValueOfType<String>(json, r'id'),
    oauthID: mapValueOfType<String>(json, r'oauthID'),
    name: mapValueOfType<String>(json, r'name'),
    status: UserStatusEnum.fromJson(json[r'status']),
  );
}