-
-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapsing Toolbar #7
Comments
NestedScrollView is not currently supported, but you can use CustomScrollView. Because the NestedScrollView is also internally implemented using CustomScrollView, the same effect can be achieved. // This is the implementation of NestedScrollView
List<Widget> _buildSlivers(BuildContext context, ScrollController innerController, bool bodyIsScrolled) {
final List<Widget> slivers = <Widget>[];
slivers.addAll(headerSliverBuilder(context, bodyIsScrolled));
slivers.add(SliverFillRemaining(
child: PrimaryScrollController(
controller: innerController,
child: body,
),
));
return slivers;
}
...
_NestedScrollViewCustomScrollView(
scrollDirection: widget.scrollDirection,
reverse: widget.reverse,
physics: widget.physics != null
? widget.physics.applyTo(const ClampingScrollPhysics())
: const ClampingScrollPhysics(),
controller: _coordinator._outerController,
slivers: widget._buildSlivers(
context,
_coordinator._innerController,
_lastHasScrolledBody,
),
handle: _absorberHandle,
);
...
class _NestedScrollViewCustomScrollView extends CustomScrollView
... NestedScrollView just converts all Widgets into slivers of CustomScrollView |
Okay thanks |
1.2.4 has been able to support NestedScrollView, you can refer to the example NestedScrollViewPage |
Closed
This was referenced Dec 29, 2020
This was referenced Mar 15, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thank you I really like this package. I tried adding TabBar to your Sliver example https://github.com/xuelongqy/flutter_easyrefresh/blob/master/example/lib/page/sliver_page.dart
but when its collapse TabBar also collapsing how can i use this package with SliverAppBar and TabBar both for this i need to use NestedScrollView but i dont know if this package works well with it ?
The text was updated successfully, but these errors were encountered: