StraightLine.fromJson constructor

StraightLine.fromJson(
  1. Map<String, dynamic> data
)

Implementation

factory StraightLine.fromJson(Map<String, dynamic> data) {
  return StraightLine.data(
    startPoint: jsonToOffset(data['startPoint'] as Map<String, dynamic>),
    endPoint: jsonToOffset(data['endPoint'] as Map<String, dynamic>),
    paint: jsonToPaint(data['paint'] as Map<String, dynamic>),
  );
}