setPlayEnable method

  1. @override
Future<void> setPlayEnable(
  1. bool enable
)
override

Implementation

@override
Future<void> setPlayEnable(bool enable) async {
  try {
    await methodChannel
        .invokeMethod('playEnable', {"enable": enable}); // 调用原生方法
  } on PlatformException catch (e) {
    log("调用失败: '${e.message}'.");
  }
}