hierarchy method
Returns a List of Component
s representing the full hierarchy
of this Component
, with the top-most parent at index 0 and this
as the last element of the List.
Implementation
List<Component> hierarchy() =>
(parent == null ? <Component>[] : parent!.hierarchy())..add(this);