Better file naming on selective export

This commit is contained in:
Imran Remtulla
2025-02-21 17:31:14 -05:00
parent 4c94f278e2
commit f2f055ad83

View File

@ -911,13 +911,15 @@ class AppsPageState extends State<AppsPage> {
.map((e) => e.id)
.toList(),
overrideExportSettings: false));
String fn =
'${tr('obtainiumExportHyphenatedLowercase')}-${DateTime.now().toIso8601String().replaceAll(':', '-')}-count-${selectedApps.length}';
XFile f = XFile.fromData(
Uint8List.fromList(
utf8.encode(exportJSON)),
mimeType: 'application/json',
name:
'${tr('obtainiumExportHyphenatedLowercase')}-${selectedApps.length}-${DateTime.now().millisecondsSinceEpoch}');
Share.shareXFiles([f]);
name: fn);
Share.shareXFiles([f],
fileNameOverrides: ['$fn.json']);
},
child: Text(
'${tr('share')} - ${tr('obtainiumExport')}')),