getAccessedDirectories method

  1. @override
Future<List<FilesModel>> getAccessedDirectories()
override

Future method getDefaultSavingDirectory has FilesModel return Value

Implementation

@override
Future<List<FilesModel>> getAccessedDirectories() async {
  final value =
      await methodChannel.invokeListMethod<String>(_GET_ACCESSED_DIR);
  List<FilesModel> filesM = [];
  if (value != null) {
    if (value.isNotEmpty) {
      for (var i in value) {
        filesM.add(FilesModel.fromMap(json.decode(i)));
      }
      return filesM;
    } else {
      return [];
    }
  } else {
    return [];
  }
}