Size.fromJSON constructor

Size.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

Size.fromJSON(Map<String, dynamic> json)
    : this(json.containsKey('width') ? (json['width'] as num).toDouble() : throw ArgumentError('width'),
          json.containsKey('height') ? (json['height'] as num).toDouble() : throw ArgumentError('height'));