resetText method

void resetText(
  1. String text
)

Replaces the entire content of this file with the specified text.

Implementation

void resetText(String text) {
  const ls = LineSplitter();
  final newLines = ls.convert(text);
  lines.clear();
  lines.addAll(newLines);
  modified = true;
}