getDescendants static method
- PlatformMenu item
Returns all descendants of the given item.
This API is supplied so that implementers of PlatformMenu can share this implementation.
Implementation
static List<PlatformMenuItem> getDescendants(PlatformMenu item) {
return <PlatformMenuItem>[
for (final PlatformMenuItem child in item.menus) ...<PlatformMenuItem>[
child,
...child.descendants,
],
];
}