pickFile method

Future<AttachmentResult?> pickFile()

Launches the device file picker to select any document or file.

Implementation

Future<AttachmentResult?> pickFile() async {
  try {
    final String? path = await _channel.invokeMethod('pickFile');
    if (path != null) {
      return _resultFromPath(path);
    }
    return null;
  } catch (e) {
    debugPrint('PixelToPdfService: pickFile error: $e');
    return null;
  }
}