fromJson static method
Implementation
static HorizontalRayTool fromJson(Map<String, dynamic> json) {
return HorizontalRayTool(
id: json['id'],
yPosition: json['yPosition']?.toDouble(),
centerX: json['centerX']?.toDouble(),
priceValue: json['priceValue']?.toDouble(),
color: Color(json['color'] ?? 0xFF00BFFF),
strokeWidth: json['strokeWidth']?.toDouble() ?? 2.0,
)..isVisible = json['isVisible'] ?? true;
}