SearchResults.fromJson constructor

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

Implementation

factory SearchResults.fromJson(Map<String, Object?> json) {
  return SearchResults(
    expand: json[r'expand'] as String?,
    startAt: (json[r'startAt'] as num?)?.toInt(),
    maxResults: (json[r'maxResults'] as num?)?.toInt(),
    total: (json[r'total'] as num?)?.toInt(),
    issues: (json[r'issues'] as List<Object?>?)
            ?.map((i) =>
                IssueBean.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    warningMessages: (json[r'warningMessages'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    names: json[r'names'] as Map<String, Object?>?,
    schema: json[r'schema'] as Map<String, Object?>?,
  );
}