saveToFile method
Implementation
Future<String> saveToFile(String url, String type) async {
if (this.isNotEmpty) {
String path = await ModernFormFileHelper.getFilePathFromUrl(url, type);
bool exist = await url.isSaveinDeviceFromUrl(type);
if (!exist) {
await ModernFormFileWriteStatic.writeAsBytes(path, this);
}
return path;
} else {
return "";
}
}