QWVideoInfo.fromJson constructor

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

Implementation

QWVideoInfo.fromJson(Map<String, dynamic> json) {
  aspectRatio = json['aspect_ratio'].cast<int>();
  durationMillis = json['duration_millis'];
  if (json['variants'] != null) {
    variants = <QWVariants>[];
    json['variants'].forEach((v) {
      variants.add(QWVariants.fromJson(v));
    });
  }
}