VroomVehicleStep.fromJson constructor

VroomVehicleStep.fromJson(
  1. Map<String, dynamic> json
)

Generates a VroomVehicleStep from a Map having keys matching the Vroom API Vehicle Step model that includes:

'type', 'id', 'service_at', 'service_after', and 'service_before'.

Implementation

factory VroomVehicleStep.fromJson(Map<String, dynamic> json) =>
    VroomVehicleStep(
      type: vroomVehicleStepTypeFromString(json['type'] as String),
      id: json['id'],
      serviceAt: json['service_at'],
      serviceAfter: json['service_after'],
      serviceBefore: json['service_before'],
    );