@@ -82,35 +82,38 @@ class DraggableHome extends StatefulWidget {
82
82
83
83
final ScrollPhysics ? physics;
84
84
85
+ final ScrollController ? scrollController;
86
+
85
87
/// This will create DraggableHome.
86
- const DraggableHome (
87
- {Key ? key,
88
- this .leading,
89
- required this .title,
90
- this .centerTitle = true ,
91
- this .actions,
92
- this .alwaysShowLeadingAndAction = false ,
93
- this .alwaysShowTitle = false ,
94
- this .headerExpandedHeight = 0.35 ,
95
- required this .headerWidget,
96
- this .headerBottomBar,
97
- this .backgroundColor,
98
- this .appBarColor,
99
- this .curvedBodyRadius = 20 ,
100
- required this .body,
101
- this .drawer,
102
- this .fullyStretchable = false ,
103
- this .stretchTriggerOffset = 200 ,
104
- this .expandedBody,
105
- this .stretchMaxHeight = 0.9 ,
106
- this .bottomSheet,
107
- this .bottomNavigationBarHeight = kBottomNavigationBarHeight,
108
- this .bottomNavigationBar,
109
- this .floatingActionButton,
110
- this .floatingActionButtonLocation,
111
- this .floatingActionButtonAnimator,
112
- this .physics})
113
- : assert (headerExpandedHeight > 0.0 &&
88
+ const DraggableHome ({
89
+ Key ? key,
90
+ this .leading,
91
+ required this .title,
92
+ this .centerTitle = true ,
93
+ this .actions,
94
+ this .alwaysShowLeadingAndAction = false ,
95
+ this .alwaysShowTitle = false ,
96
+ this .headerExpandedHeight = 0.35 ,
97
+ required this .headerWidget,
98
+ this .headerBottomBar,
99
+ this .backgroundColor,
100
+ this .appBarColor,
101
+ this .curvedBodyRadius = 20 ,
102
+ required this .body,
103
+ this .drawer,
104
+ this .fullyStretchable = false ,
105
+ this .stretchTriggerOffset = 200 ,
106
+ this .expandedBody,
107
+ this .stretchMaxHeight = 0.9 ,
108
+ this .bottomSheet,
109
+ this .bottomNavigationBarHeight = kBottomNavigationBarHeight,
110
+ this .bottomNavigationBar,
111
+ this .floatingActionButton,
112
+ this .floatingActionButtonLocation,
113
+ this .floatingActionButtonAnimator,
114
+ this .physics,
115
+ this .scrollController,
116
+ }) : assert (headerExpandedHeight > 0.0 &&
114
117
headerExpandedHeight < stretchMaxHeight),
115
118
assert (
116
119
(stretchMaxHeight > headerExpandedHeight) && (stretchMaxHeight < .95 ),
@@ -186,6 +189,7 @@ class _DraggableHomeState extends State<DraggableHome> {
186
189
) {
187
190
return CustomScrollView (
188
191
physics: widget.physics ?? const BouncingScrollPhysics (),
192
+ controller: widget.scrollController,
189
193
slivers: [
190
194
StreamBuilder <List <bool >>(
191
195
stream: CombineLatestStream .list <bool >([
0 commit comments