Support exporting reports on desktop

This commit is contained in:
Hillel Coren 2022-01-27 13:11:41 +02:00
parent 38df3b293c
commit 5d0103cb24
3 changed files with 9 additions and 3 deletions

View File

@ -429,7 +429,9 @@ class ReportsScreenVM {
if (kIsWeb) { if (kIsWeb) {
WebUtils.downloadTextFile(filename, csvData); WebUtils.downloadTextFile(filename, csvData);
} else { } else {
final directory = await getApplicationDocumentsDirectory(); final directory = await (isDesktopOS()
? getDownloadsDirectory()
: getApplicationDocumentsDirectory());
final filePath = final filePath =
directory.path + file.Platform.pathSeparator + filename; directory.path + file.Platform.pathSeparator + filename;
final csvFile = file.File(filePath); final csvFile = file.File(filePath);

View File

@ -4,11 +4,13 @@
<dict> <dict>
<key>com.apple.security.app-sandbox</key> <key>com.apple.security.app-sandbox</key>
<true/> <true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.cs.allow-jit</key> <key>com.apple.security.cs.allow-jit</key>
<true/> <true/>
<key>com.apple.security.network.server</key> <key>com.apple.security.network.server</key>
<true/> <true/>
<key>com.apple.security.network.client</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -6,5 +6,7 @@
<true/> <true/>
<key>com.apple.security.network.client</key> <key>com.apple.security.network.client</key>
<true/> <true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
</dict> </dict>
</plist> </plist>