showPeek function
Future<void>
showPeek(
- BuildContext context, {
- Peek? peek,
- PeekStrings strings = const PeekStrings(),
- PeekBodyLoader? bodyLoader,
- bool fullscreenDialog = true,
Opens Peek over context and completes when it is closed.
await showPeek(context);
Shows peek, or Peek.instance when omitted. rootNavigator keeps the
screen above a nested navigator, such as a tab bar.
Works from MaterialApp.builder too, where the app's navigator is below
context rather than above it.
Implementation
Future<void> showPeek(
BuildContext context, {
Peek? peek,
PeekStrings strings = const PeekStrings(),
PeekShareDelegate? share,
PeekBodyLoader? bodyLoader,
bool fullscreenDialog = true,
bool rootNavigator = true,
}) => _navigatorFor(context, rootNavigator).push(
PeekRoute(
peek: peek,
strings: strings,
share: share,
bodyLoader: bodyLoader,
fullscreenDialog: fullscreenDialog,
),
);