PageOfWorklogs.fromJson constructor

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

Implementation

factory PageOfWorklogs.fromJson(Map<String, Object?> json) {
  return PageOfWorklogs(
    maxResults: (json[r'maxResults'] as num?)?.toInt(),
    startAt: (json[r'startAt'] as num?)?.toInt(),
    total: (json[r'total'] as num?)?.toInt(),
    worklogs: (json[r'worklogs'] as List<Object?>?)
            ?.map((i) =>
                Worklog.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}