fromJson static method

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

Implementation

static HorizontalRayTool fromJson(Map<String, dynamic> json) {
  return HorizontalRayTool(
    id: json['id'],
    startPoint: json['startPoint'] != null
        ? Offset(json['startPoint']['x'], json['startPoint']['y'])
        : null,
    direction: json['direction'],
    color: Color(json['color']),
    strokeWidth: json['strokeWidth'],
  );
}