SourceFile.fromString constructor

SourceFile.fromString(
  1. String text,
  2. {Object? url}
)

Creates a new source file from text.

url may be either a String, a Uri, or null.

Implementation

SourceFile.fromString(String text, {Object? url})
    : this.decoded(text.codeUnits, url: url);