EntertainmentSegment.fromJson constructor

EntertainmentSegment.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a EntertainmentSegment object from the JSON response to a GET request.

Implementation

factory EntertainmentSegment.fromJson(Map<String, dynamic> dataMap) {
  return EntertainmentSegment(
    start: dataMap[ApiFields.start] ?? 0,
    length: dataMap[ApiFields.length] ?? 1,
  );
}