Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 9aeb223

Browse files
authored
Refactor visibility_detector to avoid forcing compositing. (#367)
1 parent 0078aa6 commit 9aeb223

11 files changed

+703
-554
lines changed
Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,51 @@
1-
# 0.3.3
1+
# CHANGELOG
2+
3+
## 0.4.0
4+
5+
* Refactor to avoid forcing composition in the layer/render trees.
6+
* Remove `VisibilityDetectorLayer`.
7+
* Add `RenderVisibilityDetectorBase` as a mixin that mostly takes over
8+
functionality from the old layer.
9+
* Remove the lookup map/method for getting former screen rects and instead add
10+
the rect to `VisibilityInfo`.
11+
12+
## 0.3.3
13+
214
* Re-apply Flutter framework bindings' null safety calls but set SDK
315
constraints correctly to 2.12.0 instead.
416

5-
# 0.3.2
17+
## 0.3.2
18+
619
* Reverts change from 0.3.0 where the Flutter version constraint should have
720
been set to 2.12.0 instead of 2.10.5.
821

9-
# 0.3.1-dev
22+
## 0.3.1-dev
23+
1024
* Populate the pubspec `repository` field.
1125

12-
# 0.3.0
26+
## 0.3.0
27+
1328
* Move to Flutter version 2.10.5 and update dependencies' null safety calls.
1429

15-
# 0.2.2
30+
## 0.2.2
1631

1732
* Minor internal changes to maintain forward-compatibility with [flutter#91753](https://github.com/flutter/flutter/pull/91753).
1833

19-
# 0.2.1
34+
## 0.2.1
2035

2136
* Bug fix for using VisibilityDetector with FittedBox and Transform.scale [issue #285](https://github.com/google/flutter.widgets/issues/285).
2237

23-
# 0.2.0
38+
## 0.2.0
2439

2540
* Added `SliverVisibilityDetector` to report visibility of `RenderSliver`-based
2641
widgets. Fixes [issue #174](https://github.com/google/flutter.widgets/issues/174).
2742

28-
# 0.2.0-nullsafety.1
43+
## 0.2.0-nullsafety.1
2944

3045
* Revert change to add `VisibilityDetectorController.scheduleNotification`,
3146
which introduced unexpected memory usage.
3247

33-
# 0.2.0-nullsafety.0
48+
## 0.2.0-nullsafety.0
3449

3550
* Update to null safety.
3651

@@ -41,7 +56,7 @@
4156
* Add `VisibilityDetectorController.scheduleNotification` to force firing a
4257
visibility callback.
4358

44-
# 0.1.5
59+
## 0.1.5
4560

4661
* Compatibility fixes to `demo.dart` for Flutter 1.13.8.
4762

@@ -52,24 +67,24 @@
5267

5368
* Added a "Known limitations" section to `README.md`.
5469

55-
# 0.1.4
70+
## 0.1.4
5671

5772
* Style and comment adjustments.
5873

5974
* Fix a potential infinite loop in the demo app and add tests for it.
6075

61-
# 0.1.3
76+
## 0.1.3
6277

6378
* Fixed positioning of text selection handles for `EditableText`-based
6479
widgets (e.g. `TextField`, `CupertinoTextField`) when used within a
6580
`VisibilityDetector`.
6681

6782
* Added `VisibilityDetectorController.widgetBoundsFor`.
6883

69-
# 0.1.2
84+
## 0.1.2
7085

7186
* Compatibility fixes for Flutter 1.3.0.
7287

73-
# 0.1.1
88+
## 0.1.1
7489

7590
* Added `VisibilityDetectorController.forget`.

packages/visibility_detector/example/lib/main.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class VisibilityDetectorDemo extends StatelessWidget {
7474
Widget build(BuildContext context) {
7575
return MaterialApp(
7676
title: title,
77+
scrollBehavior:
78+
const MaterialScrollBehavior().copyWith(scrollbars: false),
7779
theme: ThemeData(primarySwatch: Colors.blue),
7880
home: VisibilityDetectorDemoPage(key: key, useSlivers: useSlivers),
7981
);

packages/visibility_detector/lib/src/render_sliver_visibility_detector.dart

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)