I need to know the line number and column of start and end of an Element
from the Analyzer
package.
For example:
// Some class
class Foo {
String bar = '';
}
The Foo
class starts at line 2 column 0 and ends at line 4 column 0.
How can I know that from ClassElement
?
Found how to get the
AstNode
from anElement
:The
AstNode
hasoffset
andend
integers that mark the location in the dart file.