copyDiff method

Future<void> copyDiff(
  1. String diff
)

Format a diff string and copy it to the clipboard.

diff should be a pre-formatted unified diff string.

Implementation

Future<void> copyDiff(String diff) async {
  await copy(
    diff,
    source: ClipboardSource.tool,
    contentType: ClipboardContentType.diff,
    label: 'diff',
  );
}