play method

Future<void> play(
  1. bool looped
)

Starts playing the audio file

looped - Indicate if the audio file should be played repeatedly or once

Throws VIException, if an error occurred. For all possible errors see VIAudioFileError

Implementation

Future<void> play(bool looped) async {
  try {
    await _methodChannel.invokeMethod('AudioFile.play',
        <String, dynamic>{'fileId': _fileId, 'looped': looped});
    _looped = looped;
    return Future.value();
  } on PlatformException catch (e) {
    throw VIException(e.code, e.message);
  } catch (e) {
    rethrow;
  }
}