presentingSheetItem method

GlassBarSheetItem? presentingSheetItem(
  1. ModalRoute route
)

The GlassBarItem.sheet whose capsule the shell is keeping hoisted for route through the sheet presented out of it, or null.

Non-null only while isHoisting is false for the presentation: the rest of the chrome is the route's to draw, and the slot this item's group occupies stays the placeholder it already had, since the shell still draws that capsule and the morph has emptied it. It reads null again the frame the sheet is dismissed, when the whole chrome hoists back and the droplet is still on its way home. The instance is the one that was tapped, so a bar that rebuilds its items compares by id.

Implementation

GlassBarSheetItem? presentingSheetItem(ModalRoute<dynamic> route) {
  final hold = _sheetHold;
  if (hold == null || !identical(hold.route, route) || isHoisting(route)) {
    return null;
  }
  return hold.item;
}