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) {
WebUtils.downloadTextFile(filename, csvData);
} else {
final directory = await getApplicationDocumentsDirectory();
final directory = await (isDesktopOS()
? getDownloadsDirectory()
: getApplicationDocumentsDirectory());
final filePath =
directory.path + file.Platform.pathSeparator + filename;
final csvFile = file.File(filePath);

View File

@ -4,11 +4,13 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<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>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>

View File

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