Viewport.fromJson constructor

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

Implementation

factory Viewport.fromJson(Map<String, dynamic> json) {
  return Viewport(
    x: json['x'] as num,
    y: json['y'] as num,
    width: json['width'] as num,
    height: json['height'] as num,
    scale: json['scale'] as num,
  );
}