hideNotification method

Future<bool> hideNotification()

Hides the playback notification

Implementation

Future<bool> hideNotification() async {
  // If platform implementation is not available or not initialized, return false
  if (!_platformImplementationAvailable || !_initialized) {
    return false;
  }

  try {
    final result = await _channel.invokeMethod<bool>('hideNotification');
    return result ?? false;
  } catch (e) {
    if (e is MissingPluginException) {
      _platformImplementationAvailable = false;
    }
    return false;
  }
}