resize method

void resize(
  1. int width,
  2. int height
)

Implementation

void resize(int width, int height) {
  if (!isDisposed) {
    canvasElement.width = width;
    canvasElement.height = height;

    if (dotLottiePlayer != null) {
      try {
        final player = dotLottiePlayer as JSObject;
        final method = player['resize'.toJS] as JSFunction?;
        if (method != null) {
          method.callAsFunction(player);
        }
      } catch (e) {}
    }
  }
}