fromJson static method

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

Implementation

static UserModel fromJson(Map<String, dynamic> json) => UserModel(
      userId: json['userId'] as String,
      firstName: json['firstName'] as String,
      lastName: json['lastName'] as String,
      email: json['email'] as String,
      roles:
          (json['roles'] as List<dynamic>).map((e) => e as String).toList(),
    );