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:
@@ -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: (_) {
|
||||
|
||||
Reference in New Issue
Block a user