toJson method
Convert to a Map
Implementation
Map<String, dynamic> toJson() {
final angleValue = switch (angle) {
RotationAngle.clockwise90 => 90,
RotationAngle.clockwise180 => 180,
RotationAngle.counterClockwise90 => -90,
};
return {
'pageNumber': pageNumber,
'angle': angleValue,
'original': original,
};
}