contains method
Whether item is one of items — by identity, or by id where it has
one, as items are matched across routes.
Implementation
bool contains(GlassBarActionItem item) => items.any((candidate) =>
identical(candidate, item) ||
(item.id != null && candidate.id == item.id));