TextDocument.fromLineTexts constructor

TextDocument.fromLineTexts(
  1. List<String> lineTexts, {
  2. List<int>? lineLengths,
})

Implementation

TextDocument.fromLineTexts(List<String> lineTexts, {List<int>? lineLengths}) {
  final normalizedLineTexts = lineTexts.isEmpty
      ? const <String>['']
      : List<String>.from(lineTexts, growable: false);
  _storage = _optimizedStorageFromLineTexts(
    normalizedLineTexts,
    lineLengths: lineLengths,
    revision: 0,
  );
}