FieldDetails.fromJson constructor

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

Implementation

factory FieldDetails.fromJson(Map<String, Object?> json) {
  return FieldDetails(
    clauseNames: (json[r'clauseNames'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    custom: json[r'custom'] as bool? ?? false,
    id: json[r'id'] as String?,
    key: json[r'key'] as String?,
    name: json[r'name'] as String?,
    navigable: json[r'navigable'] as bool? ?? false,
    orderable: json[r'orderable'] as bool? ?? false,
    schema: json[r'schema'] != null
        ? JsonTypeBean.fromJson(json[r'schema']! as Map<String, Object?>)
        : null,
    scope: json[r'scope'] != null
        ? Scope.fromJson(json[r'scope']! as Map<String, Object?>)
        : null,
    searchable: json[r'searchable'] as bool? ?? false,
  );
}