PermissionDetails.fromJson constructor

PermissionDetails.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory PermissionDetails.fromJson(Map<String, Object?> json) {
  return PermissionDetails(
    editPermissions: (json[r'editPermissions'] as List<Object?>?)
            ?.map((i) => SharePermission.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    sharePermissions: (json[r'sharePermissions'] as List<Object?>?)
            ?.map((i) => SharePermission.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}