toBrsJson method

Map<String, dynamic> toBrsJson(
  1. RouteResponse brs
)

Implementation

Map<String, dynamic> toBrsJson(BaatoRoute.RouteResponse brs) {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['timestamp'] = brs.timestamp;
  data['status'] = brs.status;
  data['message'] = brs.message;
  if (brs.data != null) {
    data['routes'] =
        brs.data.map((v) => v.toJson()).toList();
  }
  return data;
}