Rect toRect(Map json) => Rect.fromLTRB( (json['left'] as int).toDouble(), (json['top'] as int).toDouble(), (json['right'] as int).toDouble(), (json['right'] as int).toDouble(), );