resolvePeek static method

bool resolvePeek({
  1. required Set<GlassSheetDetent> detents,
  2. required GlassSheetMode mode,
})

Resolve whether the peek floor is active, from the public API's detents and mode.

The peek floor is active when:

  1. GlassSheetDetent.small is in detents.
  2. GlassSheetMode.persistent is active (a persistent sheet is DEFINED by resting on a floor instead of dismissing).

Implementation

static bool resolvePeek({
  required Set<GlassSheetDetent> detents,
  required GlassSheetMode mode,
}) =>
    detents.contains(GlassSheetDetent.small) ||
    mode == GlassSheetMode.persistent;