addWatermark method

Future<bool> addWatermark(
  1. String text, {
  2. double fontSize = 48,
  3. Color color = const Color(0x33000000),
  4. double rotation = 45,
})

Implementation

Future<bool> addWatermark(String text, {double fontSize = 48, Color color = const Color(0x33000000), double rotation = 45}) async {
  attach();
  final UPdfEdit? edit = _edit;
  if (edit == null) return false;
  await edit.addTextWatermark(text, fontSize: fontSize, color: color, rotation: rotation);
  viewer.invalidateAll();
  notifyListeners();
  return true;
}