removeQuote method

Future<bool> removeQuote(
  1. String text,
  2. int pageNumber
)

Removes a specific quote from the PDF

text The exact text of the quote to remove pageNumber The page number where the quote is located (1-based)

Returns a Future that completes with true if the quote was successfully removed or throws a PlatformException if:

  • The PDF viewer is not open
  • The page number is invalid
  • The quote could not be found
  • There was an error removing the quote

Implementation

Future<bool> removeQuote(String text, int pageNumber) async {
  try {
    final Map<String, dynamic> params = {
      'text': text,
      'pageNumber': pageNumber,
    };

    return await _channel.invokeMethod('removeQuote', params);
  } on PlatformException catch (e) {
    print('Error removing quote: ${e.message}');
    rethrow;
  }
}