Skip to content

Commit

Permalink
Expose onAttach and onDetach in scroll controller (#386)
Browse files Browse the repository at this point in the history
* Expose onattach and ondetach in scroll controller

* Expose on attach and detach in sheet controller
  • Loading branch information
Hari-07 authored Mar 12, 2024
1 parent 2703e68 commit 14ff58b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sheet/lib/src/scroll_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class SheetPrimaryScrollController extends ScrollController {
SheetPrimaryScrollController({
super.initialScrollOffset,
super.debugLabel,
super.onAttach,
super.onDetach,
required this.sheetContext,
});

Expand Down
6 changes: 5 additions & 1 deletion sheet/lib/src/sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ class _DefaultSheetScrollController extends StatelessWidget {
/// * [SheetPosition], which manages the positioning logic for
/// this controller.
class SheetController extends ScrollController {
SheetController({super.debugLabel}) : super(initialScrollOffset: 0);
SheetController({
super.debugLabel,
super.onAttach,
super.onDetach,
}) : super(initialScrollOffset: 0);

final ProxyAnimation _animation = ProxyAnimation();
Animation<double> get animation => _animation;
Expand Down

0 comments on commit 14ff58b

Please sign in to comment.