Eraser.fromJson constructor

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

Implementation

factory Eraser.fromJson(Map<String, dynamic> data) {
  return Eraser.data(
    drawPath: DrawPath.fromJson(data['path'] as Map<String, dynamic>),
    paint: jsonToPaint(data['paint'] as Map<String, dynamic>),
  );
}