onSurfaceSizeChanged method

dynamic onSurfaceSizeChanged(
  1. Size oldSize,
  2. Size newSize
)

Called when the surface size changes to adjust the particle's position if needed.

The oldSize parameter represents the previous size of the surface. The newSize parameter represents the new size of the surface.

Implementation

onSurfaceSizeChanged(Size oldSize, Size newSize) {}