canCopy property

  1. @override
bool canCopy

Returns whether the user is currently allowed to copy content to the pasteboard.

Navigators and reading apps can use this to know if the "Copy" action should be greyed out or not. This should be called every time the "Copy" action will be displayed, because the value might change during runtime.

Implementation

@override
bool get canCopy => (charactersToCopyLeft ?? 1) > 0;