getDocumentsPath method

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

Implementation

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