setFilePath method
Convenience method to set the audio source to a file, preloaded by default, with an initial position of zero by default.
This is equivalent to:
setAudioSource(AudioSource.uri(Uri.file(filePath), tag: tag),
initialPosition: Duration.zero, preload: true);
See setAudioSources for a detailed explanation of the options.
Implementation
Future<Duration?> setFilePath(
String filePath, {
Duration? initialPosition,
bool preload = true,
dynamic tag,
}) =>
setAudioSource(AudioSource.file(filePath, tag: tag),
initialPosition: initialPosition, preload: preload);