Skip to main content Link Menu Expand (external link) Document Search Copy Copied
getResourcePath method - FlutterSoundPlayer class - player library - Dart API
menu
getResourcePath

getResourcePath method

Future<String?> getResourcePath()

Get the resource path.

This verb should probably not be here...

Implementation

Future<String?> getResourcePath() async {
  await _waitOpen();
  if (_isInited != Initialized.fullyInitialized) {
    throw Exception('Player is not open');
  }
  if (kIsWeb) {
    return null;
  } else if (Platform.isIOS) {
    var s = await FlutterSoundPlayerPlatform.instance.getResourcePath(this);
    return s;
  } else {
    return (await getApplicationDocumentsDirectory()).path;
  }
}
flutter_sound 9.24.0