Viewport.fromJson constructor

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

Implementation

factory Viewport.fromJson(Map<String, dynamic> json) {
  return Viewport(
    width: json['width'],
    height: json['height'],
    deviceScaleFactor: json['deviceScaleFactor'],
    isMobile: json['isMobile'],
    isLandscape: json['isLandscape'],
    hasTouch: json['hasTouch'],
  );
}