Channel.fromJson constructor

Channel.fromJson(
  1. dynamic json
)

Implementation

factory Channel.fromJson(dynamic json) {
  //print(json);
  final creationtime = DateTime.parse(json['creationtime']); // 8:18pm
  var caller = CallerID.fromJson(json['caller']);
  return Channel(
      json['id'] as String,
      json['name'] as String,
      json['accountcode'] as String,
      json['state'] as String,
      caller as CallerID,
      json['dialplan'] as dynamic,
      creationtime as DateTime,
      json['language'] as String,
      json['channelvars'] as dynamic,
      json as dynamic);
}