setup method

Future<void> setup()

Implementation

Future<void> setup() async {
  final path = await getApplicationDocumentsDirectory();
  final file = File(path.path + '/storage.json');

  if (!file.existsSync()) {
    await file.create();
  }

  storage = file;
  content = await storage.readAsString();
}