getEntityMenuItems method

Iterable<MenuItem> getEntityMenuItems(
  1. BuildContext context,
  2. List<VEntity> entities
)

Implementation

Iterable<MenuItem> getEntityMenuItems(
    BuildContext context, List<VEntity> entities) sync* {
  yield* onEntityMenuItems(context, entities);

  if (entities.every((i) => i is VFile)) {
    yield* getFileMenuItems(context, entities.cast<VFile>());
  }

  if (entities.every((i) => i is VFolder)) {
    yield* getFolderMenuItems(context, entities.cast<VFolder>());
  }

  yield* defaultEntityMenuItems(context, entities);
}