getHostElement method

JSAny? getHostElement(
  1. int viewId
)

Returns the hostElement configuration value passed from JS when viewId was added.

This is useful for plugins and apps to have a safe DOM Element where they can add their own custom HTML elements (for example: file inputs for the file_selector plugin).

Implementation

JSAny? getHostElement(int viewId) {
  return _viewManager.getOptions(viewId)?.hostElement as JSAny?;
}