Parse-SDK-Flutter
Parse-SDK-Flutter copied to clipboard
Problem of setting the filename
Problem of setting the filename and url, I have to instance the ParseFile and by null in the first parameter file in this part it gives an error in version 2.1.0 it didn't have this problem, how do I put the URL in the ParseFile objective in this new version of the package
Future<List<ParseFile>> saveImages(List images) async { final parseImages = <ParseFile>[];
try {
for (final image in images) {
if (image is File) {
final parseFile = ParseFile(image, name: path.basename(image.path));
final response = await parseFile.save();
if (!response.success) {
return Future.error(
ParseErrors.getDescription(response.error.code));
}
parseImages.add(parseFile);
} **else {
final parseFile = ParseFile(null); <==================
parseFile.name = path.basename(image.path); <=================
parseFile.url = image;
parseImages.add(parseFile);**
}
}
What error do you get? Is there a message?
It was tested, there is no problem, if you declare that the problem is not solved, the issue will be opened again