Rectangle.fromJson constructor

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

Implementation

factory Rectangle.fromJson(Map<String, dynamic> data) {
  return Rectangle.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>),
  );
}