mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-16 14:46:44 +02:00
Better file naming on selective export
This commit is contained in:
@ -911,13 +911,15 @@ class AppsPageState extends State<AppsPage> {
|
|||||||
.map((e) => e.id)
|
.map((e) => e.id)
|
||||||
.toList(),
|
.toList(),
|
||||||
overrideExportSettings: false));
|
overrideExportSettings: false));
|
||||||
|
String fn =
|
||||||
|
'${tr('obtainiumExportHyphenatedLowercase')}-${DateTime.now().toIso8601String().replaceAll(':', '-')}-count-${selectedApps.length}';
|
||||||
XFile f = XFile.fromData(
|
XFile f = XFile.fromData(
|
||||||
Uint8List.fromList(
|
Uint8List.fromList(
|
||||||
utf8.encode(exportJSON)),
|
utf8.encode(exportJSON)),
|
||||||
mimeType: 'application/json',
|
mimeType: 'application/json',
|
||||||
name:
|
name: fn);
|
||||||
'${tr('obtainiumExportHyphenatedLowercase')}-${selectedApps.length}-${DateTime.now().millisecondsSinceEpoch}');
|
Share.shareXFiles([f],
|
||||||
Share.shareXFiles([f]);
|
fileNameOverrides: ['$fn.json']);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'${tr('share')} - ${tr('obtainiumExport')}')),
|
'${tr('share')} - ${tr('obtainiumExport')}')),
|
||||||
|
Reference in New Issue
Block a user