Add explicit surface visibility signal

Provide composable shown/current visibility for retained surfaces and migrate visibility readers away from TickerMode. This keeps ticker muting separate from painted and current-surface state.
This commit is contained in:
2026-11-10 20:28:09 +00:00
parent e0e8ca68f3
commit 7ff012880b
13 changed files with 179 additions and 25 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../ui/adaptive/host.dart';
import '../ui/motion/surface_visibility.dart';
/// The open item's own navigator beside a list on a wide window.
///
@@ -48,7 +49,7 @@ class _DetailPaneNavigatorState extends State<DetailPaneNavigator> {
// Only the shown tab's pane answers the system Back: a page left open in
// another tab's pane stays there while Back acts on the current tab. The
// route asks every handler on it, so a hidden pane also ignores the call.
final shown = TickerMode.valuesOf(context).enabled;
final shown = SurfaceVisibility.currentOf(context);
return NavigatorPopHandler(
enabled: shown,
onPopWithResult: (_) {