Disable save in downloads for mobile

This commit is contained in:
Ashita Prasad
2025-03-07 06:20:04 +05:30
parent b35068ebc1
commit 7eb5285446
2 changed files with 9 additions and 4 deletions

View File

@ -40,6 +40,7 @@ Future<void> saveToDownloads(
var sp = getShortPath(path); var sp = getShortPath(path);
message = 'Saved to $sp'; message = 'Saved to $sp';
} catch (e) { } catch (e) {
debugPrint("$e");
message = "An error occurred while saving file."; message = "An error occurred while saving file.";
} }
} else { } else {

View File

@ -154,10 +154,14 @@ class ViewCodePane extends StatelessWidget {
showLabel: showLabel, showLabel: showLabel,
), ),
), ),
SaveInDownloadsButton( // TODO: Save to Downloads folder does not work in Mobile
content: stringToBytes(code), Visibility(
ext: codegenLanguage.ext, visible: !kIsMobile,
showLabel: showLabel, child: SaveInDownloadsButton(
content: stringToBytes(code),
ext: codegenLanguage.ext,
showLabel: showLabel,
),
), ),
], ],
), ),