Code sharing refactor

This commit is contained in:
Ankit Mahato
2025-04-05 19:13:16 +05:30
parent 1bcbd1e6ce
commit 85497e0719

View File

@@ -147,22 +147,16 @@ class ViewCodePane extends StatelessWidget {
toCopy: code,
showLabel: showLabel,
),
Visibility(
visible: kIsMobile,
child: ShareButton(
toShare: code,
showLabel: showLabel,
),
),
// TODO: Save to Downloads folder does not work in Mobile
Visibility(
visible: !kIsMobile,
child: SaveInDownloadsButton(
content: stringToBytes(code),
ext: codegenLanguage.ext,
showLabel: showLabel,
),
),
kIsMobile
? ShareButton(
toShare: code,
showLabel: showLabel,
)
: SaveInDownloadsButton(
content: stringToBytes(code),
ext: codegenLanguage.ext,
showLabel: showLabel,
),
],
),
),