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:
@@ -7,6 +7,7 @@ import 'settings_theme.dart';
|
||||
import 'settings_page_body.dart';
|
||||
import 'settings_topic_store.dart';
|
||||
import '../../core/storage/ordered_local_storage.dart';
|
||||
import '../../ui/motion/surface_visibility.dart';
|
||||
|
||||
enum SettingsTopic {
|
||||
appearance('Appearance'),
|
||||
@@ -176,9 +177,13 @@ class _SettingsTopicTabsState extends State<SettingsTopicTabs>
|
||||
if (_visited.contains(topic))
|
||||
TickerMode(
|
||||
enabled: topic == _selected,
|
||||
child: KeyedSubtree(
|
||||
key: ValueKey('settings-topic-${topic.name}'),
|
||||
child: Builder(builder: widget.pages[topic]!),
|
||||
child: SurfaceVisibility(
|
||||
shown: true,
|
||||
current: topic == _selected,
|
||||
child: KeyedSubtree(
|
||||
key: ValueKey('settings-topic-${topic.name}'),
|
||||
child: Builder(builder: widget.pages[topic]!),
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user