getMusicPath method

  1. @override
Future<String?> getMusicPath()
override

Implementation

@override
Future<String?> getMusicPath() async {
  try {
    if (!Platform.isAndroid) throw _unsupportedPlatformException();
    return await methodChannel.invokeMethod<String>('getMusicPath');
  } on PlatformException catch (e) {
    debugPrint('Error getting music path: ${e.message}');
    return null;
  }
}