Changelog.fromJson constructor

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

Implementation

factory Changelog.fromJson(Map<String, Object?> json) {
  return Changelog(
    id: json[r'id'] as String?,
    author: json[r'author'] as Map<String, Object?>?,
    created: DateTime.tryParse(json[r'created'] as String? ?? ''),
    items: (json[r'items'] as List<Object?>?)
            ?.map((i) => ChangelogItemsItem.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    historyMetadata: json[r'historyMetadata'] as Map<String, Object?>?,
  );
}