තිර-ස්ථානික overlay state

OverlayRequest? සමඟ dialogs සහ sheets නිරූපණය කර ScreenOverlayHost හෝ AnimatedScreenOverlayHost හරහා render කරන්න.

එකම overlay slot එක

Overlay එක OverlayRequest? ලෙස model කර dismiss කිරීමට එය clear කරන්න.

Dialog සහ sheet සහාය

විකල්ප payload data සමඟ DialogRequest සහ BottomSheetRequest භාවිතා කරන්න.

Back order පාලනය

පළමුව overlay dismiss කරන්න, පසුව back-scope widgets හරහා pages pop කරන්න.

Overlay host pattern

Overlay එක state තුළ තබාගෙන overlayBuilder හරහා overlay UI ගොඩනඟන්න.

Overlay state රීතිය

සජීවීකරණය කළ overlay host

return AnimatedScreenOverlayHost(
  overlay: _overlay,
  onDismiss: _dismissOverlay,
  overlayBuilder: (context, req, dismiss) => switch (req) {
    DialogRequest(key: 'hello') => AlertDialog(
      title: const Text('Hello'),
      actions: [TextButton(onPressed: dismiss, child: const Text('Close'))],
    ),
    _ => null,
  },
  child: DeclarativePagesNavigator(
    pages: _pages,
    buildPage: _buildPage,
    onPopTop: _popTop,
    canPopTop: () => _overlay == null,
  ),
);
Important

Overlay එක දෘශ්‍යමාන වන විට, canPopTop සමඟ pop gestures block කරන්න iOS හි back-swipe අසංගතිකතාවය වළක්වා ගැනීමට.