Permission.fromJson constructor

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

Implementation

factory Permission.fromJson(Map<String, dynamic> json) {
  return Permission(
    granteeId: json['GranteeId'] as String,
    granteeType: (json['GranteeType'] as String).toMemberType(),
    permissionValues: (json['PermissionValues'] as List)
        .whereNotNull()
        .map((e) => (e as String).toPermissionType())
        .toList(),
  );
}