DrawingPoint.fromJson constructor

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

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