fromJson static method

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

Implementation

static CrossLineTool fromJson(Map<String, dynamic> json) {
  return CrossLineTool(
    id: json['id'],
    centerPoint: json['centerPoint'] != null
        ? Offset(json['centerPoint']['x'], json['centerPoint']['y'])
        : null,
    color: Color(json['color']),
    strokeWidth: json['strokeWidth'],
  );
}