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