fromJson static method

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

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;
}