sendFoldingNotification method

  1. @override
Future<void> sendFoldingNotification(
  1. String path
)
override

If the plugin provides folding information, send a folding notification for the file with the given path to the server.

Implementation

@override
Future<void> sendFoldingNotification(String path) async {
  try {
    var request = await getFoldingRequest(path);
    var generator = FoldingGenerator(getFoldingContributors(path));
    var generatorResult = generator.generateFoldingNotification(request);
    generatorResult.sendNotifications(channel);
  } on RequestFailure {
    // If we couldn't analyze the file, then don't send a notification.
  }
}