isPipSupported method

  1. @override
Future<bool> isPipSupported()
override

Whether this platform can enter system picture-in-picture.

本平台是否支持进入系统画中画。此查询不代表已经进入;实际状态经 pipChanges 回流。

Returns true when supported, false otherwise (the default).

支持时返回 true,否则返回 false(默认)。

Example / 示例:

if (await MovaPlatform.instance.isPipSupported()) { /* show the button */ }

Implementation

@override
Future<bool> isPipSupported() async {
  try {
    return await methodChannel.invokeMethod<bool>('isPipSupported') ?? false;
  } on PlatformException {
    return false;
  } on MissingPluginException {
    return false;
  }
}