Resize a plugin after initial creation

Is it possible to use Figma.ui.resize(width: number, height: number) to change the size of the plugin window during runtime? I would like to offer 2 different sizes of the plugin, if the user wants it…

Yes, of course. That’s what this API is for.