ContentPropertyVersion.fromJson constructor

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

Implementation

factory ContentPropertyVersion.fromJson(Map<String, Object?> json) {
  return ContentPropertyVersion(
    when: DateTime.tryParse(json[r'when'] as String? ?? '') ?? DateTime(0),
    message: json[r'message'] as String? ?? '',
    number: (json[r'number'] as num?)?.toInt() ?? 0,
    minorEdit: json[r'minorEdit'] as bool? ?? false,
    contentTypeModified: json[r'contentTypeModified'] as bool? ?? false,
  );
}