
import 'dart:convert';

import 'text_value.dart';

class DistanceInfo {
  TextValue? duration;
  TextValue? distance;
  String? status;

  DistanceInfo.fromJson(Map<String, dynamic> json)
    : duration = json['duration'] != null ? TextValue.fromJson(json['duration']) : null,
      distance = json['distance'] != null ? TextValue.fromJson(json['distance']) : null,
      status = json['status'];

  Map<String, dynamic> toJson() => {
    'duration': duration,
    'distance': distance,
    'status': status
  };

  @override
  String toString() {
    return json.encode(this);
  }
}