tryEraserThickness method
Parses eraser metadata from the action payload.
Expected schema: {eraserThickness: double}.
Implementation
double? tryEraserThickness() {
final payload = this.payload;
if (payload == null) return null;
final thickness = payload['eraserThickness'];
if (thickness is num) return thickness.toDouble();
return null;
}