clearAnnotations method

Future<void> clearAnnotations()

Delete all stored annotations

Implementation

Future<void> clearAnnotations() async {
  try {
    final directory = await getApplicationDocumentsDirectory();
    final file = File('${directory.path}/$_fileName');

    if (await file.exists()) {
      await file.delete();
    }
  } catch (e) {
    throw Exception('Failed to clear annotations: $e');
  }
}