SourceRange class
A source range defines a range of characters within source code.
Constructors
- SourceRange(int offset, int length)
- 
          Initialize a newly created source range using the given offsetandlength.const
Properties
- end → int
- 
  Return the 0-based index of the character immediately after this source
range.
  no setter
- hashCode → int
- 
  The hash code for this object.
  no setteroverride
- length → int
- 
  The number of characters in the source range.
  final
- offset → int
- 
  The 0-based index of the first character of the source range.
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  contains(int x) → bool 
- 
  Return trueifxis in the interval[offset, offset + length].
- 
  containsExclusive(int x) → bool 
- 
  Return trueifxis in the interval(offset, offset + length).
- 
  coveredBy(SourceRange otherRange) → bool 
- 
  Return trueif theotherRangecovers this source range.
- 
  covers(SourceRange otherRange) → bool 
- 
  Return trueif this source range covers theotherRange.
- 
  endsIn(SourceRange otherRange) → bool 
- 
  Return trueif this source range ends inside theotherRange.
- 
  getExpanded(int delta) → SourceRange 
- 
  Return a source range covering deltacharacters before the start of this source range anddeltacharacters after the end of this source range.
- 
  getMoveEnd(int delta) → SourceRange 
- 
  Return a source range with the same offset as this source range but whose
length is deltacharacters longer than this source range.
- 
  getTranslated(int delta) → SourceRange 
- 
  Return a source range with the same length as this source range but whose
offset is deltacharacters after the offset of this source range.
- 
  getUnion(SourceRange otherRange) → SourceRange 
- 
  Return the minimal source range that covers both this and the
otherRange.
- 
  intersects(SourceRange? otherRange) → bool 
- 
  Return trueif this source range intersects theotherRange.
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  startsIn(SourceRange otherRange) → bool 
- 
  Return trueif this source range starts in theotherRange.
- 
  toString() → String 
- 
  A string representation of this object.
  override
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  override
Constants
- EMPTY → const SourceRange
- 
  An empty source range (a range with offset 0and length0).