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
@@ -6,6 +6,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../../../ui/scale/ui_scale.dart';
import '../../../ui/motion/surface_visibility.dart';
import 'chat_stop_icon.dart';
import 'package:flutter/services.dart';
@@ -262,7 +263,7 @@ class _ChatComposerBarState extends State<ChatComposerBar> {
/// and not covered by a dialog, sheet or another pushed route.
bool _composerIsCurrent() =>
mounted &&
TickerMode.valuesOf(context).enabled &&
SurfaceVisibility.currentOf(context) &&
(ModalRoute.of(context)?.isCurrent ?? true);
@override