DrawingPoint.fromJson constructor
Implementation
factory DrawingPoint.fromJson(Map<String, dynamic> json) {
return DrawingPoint(
candleIndex: json['candleIndex'] as int,
price: (json['price'] as num).toDouble(),
timestamp: json['timestamp'] != null
? DateTime.tryParse(json['timestamp'] as String)
: null,
);
}