play method

  1. @override
void play(
  1. Uint8List pcm
)
override

Implementation

@override
void play(Uint8List pcm) {
  methodsChannel.invokeMethod<void>('play', {'pcm': pcm}).catchError((
    Object error,
  ) {
    // play() is void by API contract — surface failures as warnings
    // so consumers learn the playback dropped without changing the
    // signature (which would be a breaking change).
    _eventsController.add(
      BoatWarning(
        timestamp: DateTime.now(),
        code: 'PLAYBACK_FAILED',
        message: error.toString(),
      ),
    );
  });
}