resolveFitsContent static method
Resolve whether the sheet fits its content, from the public API's detents and mode.
True only when GlassSheetDetent.fitted is the only detent and mode
is GlassSheetMode.dismissible. Any other set that holds
GlassSheetDetent.fitted is a mistake that the widget asserts against
in debug. In release, resolveHalf treats that detent as
GlassSheetDetent.medium.
Implementation
static bool resolveFitsContent({
required Set<GlassSheetDetent> detents,
required GlassSheetMode mode,
}) =>
mode == GlassSheetMode.dismissible &&
detents.length == 1 &&
detents.contains(GlassSheetDetent.fitted);