isFinal property

  1. @override
bool isFinal
override

Return true if this variable was declared with the 'final' modifier.

Variables that are declared with the 'const' modifier will return false even though they are implicitly final.

Implementation

@override
bool get isFinal {
  final parent = this.parent;
  return parent is VariableDeclarationList && parent.isFinal;
}