Я указываю:
Код: Выделить всё
Код: Выделить всё
Future exportBackupToFile(String backupContent) async {
final Directory directory = await getTemporaryDirectory();
final String filePath = '${directory.path}/$kBackupFileName';
final File file = File(filePath);
await file.writeAsString(backupContent);
return XFile(filePath, mimeType: 'application/mytype');
}
(Если можно каким-то образом открывать приложения только с определенным расширением файла (например, .myformat), это также будет gr8!)
Подробнее здесь: https://stackoverflow.com/questions/797 ... lutter-app
Мобильная версия