getDownloadPath method

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

Implementation

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