fromJson static method
Implementation
static TrendLineTool fromJson(Map<String, dynamic> json) {
return TrendLineTool(
id: json['id'],
startPoint: json['startPoint'] != null
? Offset(json['startPoint']['x'], json['startPoint']['y'])
: null,
endPoint: json['endPoint'] != null
? Offset(json['endPoint']['x'], json['endPoint']['y'])
: null,
color: Color(json['color']),
strokeWidth: json['strokeWidth'],
extendLeft: json['extendLeft'] ?? false,
extendRight: json['extendRight'] ?? false,
);
}