pickFileJSON function

Future<String?> pickFileJSON(
  1. BuildContext context
)

Implementation

Future<String?> pickFileJSON(BuildContext context) async {
  // if (presentationOrMockTest) {
  //   return 'https://'; //TODO:
  // }
  String? path = await FilesystemPicker.open(
    title: 'Выберите TXT файл',
    context: context,
    rootDirectory: Directory(pathStorage),
    fsType: FilesystemType.file,
    allowedExtensions: ['.txt'],
    fileTileSelectMode: FileTileSelectMode.wholeTile,
  );
  return path;
}