Committed by
GitHub
Expose `onAttach` and `onDetach` in scroll controller (#386)
* Expose onattach and ondetach in scroll controller * Expose on attach and detach in sheet controller
Showing
2 changed files
with
7 additions
and
1 deletions
| @@ -19,6 +19,8 @@ class SheetPrimaryScrollController extends ScrollController { | @@ -19,6 +19,8 @@ class SheetPrimaryScrollController extends ScrollController { | ||
| 19 | SheetPrimaryScrollController({ | 19 | SheetPrimaryScrollController({ |
| 20 | super.initialScrollOffset, | 20 | super.initialScrollOffset, |
| 21 | super.debugLabel, | 21 | super.debugLabel, |
| 22 | + super.onAttach, | ||
| 23 | + super.onDetach, | ||
| 22 | required this.sheetContext, | 24 | required this.sheetContext, |
| 23 | }); | 25 | }); |
| 24 | 26 |
| @@ -317,7 +317,11 @@ class _DefaultSheetScrollController extends StatelessWidget { | @@ -317,7 +317,11 @@ class _DefaultSheetScrollController extends StatelessWidget { | ||
| 317 | /// * [SheetPosition], which manages the positioning logic for | 317 | /// * [SheetPosition], which manages the positioning logic for |
| 318 | /// this controller. | 318 | /// this controller. |
| 319 | class SheetController extends ScrollController { | 319 | class SheetController extends ScrollController { |
| 320 | - SheetController({super.debugLabel}) : super(initialScrollOffset: 0); | 320 | + SheetController({ |
| 321 | + super.debugLabel, | ||
| 322 | + super.onAttach, | ||
| 323 | + super.onDetach, | ||
| 324 | + }) : super(initialScrollOffset: 0); | ||
| 321 | 325 | ||
| 322 | final ProxyAnimation _animation = ProxyAnimation(); | 326 | final ProxyAnimation _animation = ProxyAnimation(); |
| 323 | Animation<double> get animation => _animation; | 327 | Animation<double> get animation => _animation; |
-
Please register or login to post a comment