Set the annotation author in Flutter

Each annotation created by your users will contain the annotation author name. By default, Nutrient will ask your users for this name the first time they create an annotation.

Set the annotation author name programmatically

Set the annotation author name programmatically using the Pspdfkit.setDefaultAuthorName static method. This method sets the default author name for all annotations created in the document. Call this method after initializing Pspdfkit:

Pspdfkit.initialize().then((_) {
	Pspdfkit.setDefaultAuthorName('John Doe');
});

Update the author name at any time by calling the Pspdfkit.setDefaultAuthorName method again.

Get the annotation author name

To retrieve the current annotation author name, use the Pspdfkit.getAuthorName() static method:

String authorName = await Pspdfkit.getAuthorName();
print('Author name: $authorName');

This is not yet supported on Flutter Web.