copyRowsToClipboard method

Future<int> copyRowsToClipboard(
  1. Iterable<int> rowIndices, {
  2. bool includeHeader = false,
})

Implementation

Future<int> copyRowsToClipboard(Iterable<int> rowIndices, {bool includeHeader = false}) async {
  final tsv = rowsAsTsv(rowIndices, includeHeader: includeHeader);
  if (tsv.isEmpty) return 0;
  await Clipboard.setData(ClipboardData(text: tsv));
  return tsv.split('\n').length;
}