setNativeUIVisible method
Show or hide the native player control UI.
Call setNativeUIVisible(false) when PlayerViewWithControls is used so that the Flutter overlay is the only control surface.
作用范围仅限「原生控制栏 + 横竖屏返回按钮」三项,两端一致。三个已知边界:
- 不影响原生 loading:缓冲时原生仍会显示菊花 / setLoadingGif 的动图。 自绘控制层如果自己也画转圈,会与原生叠加。
- 强制设值,不是状态恢复:
true会把三项一律打开,覆盖此前单独调过的 setPortraitBackButtonVisible / setControlBarVisible。 - PlayerMode.live 会重新接管横屏返回按钮:直播模式按设计只保留横屏返回键, setPlayerMode 之后需要再调一次本方法才能重新收起。
Implementation
Future<void> setNativeUIVisible(bool visible) =>
_invoke('setNativeUIVisible', {'visible': visible});