enablePersistentStorage static method

Future<void> enablePersistentStorage()

Setzt storageDirectory auf den App-Support-Ordner des Geraets.

Wirft nie: ohne Ordner (Plattform ohne Dateisystem, Plugin fehlt) laeuft alles wie bisher, nur ohne Ablage.

Implementation

static Future<void> enablePersistentStorage() async {
  try {
    final basis = await getApplicationSupportDirectory();
    storageDirectory = Directory('${basis.path}${Platform.pathSeparator}kasseneck_logos');
  } catch (e) {
    if (kDebugMode) {
      print('Logo-Ablage nicht verfuegbar: $e');
    }
  }
}