Remove Scaffold scrollableKey use in gallery demos (#3406)

* Remove Scaffold scrollable_key demo usage
This commit is contained in:
Hans Muller
2016-04-19 16:31:11 -07:00
parent 6e0c76f4ba
commit c7e2e8ae81
4 changed files with 4 additions and 9 deletions

View File

@@ -487,8 +487,10 @@ class ScaffoldState extends State<Scaffold> {
double _floatingAppBarHeight = 0.0;
bool _handleScrollNotification(ScrollNotification notification) {
if (config.scrollableKey == null || config.scrollableKey == notification.scrollable.config.key) {
final double newScrollOffset = notification.scrollable.scrollOffset;
final ScrollableState scrollable = notification.scrollable;
if ((scrollable.config.scrollDirection == Axis.vertical) &&
(config.scrollableKey == null || config.scrollableKey == scrollable.config.key)) {
final double newScrollOffset = scrollable.scrollOffset;
setState(() {
_scrollOffsetDelta = _scrollOffset - newScrollOffset;
_scrollOffset = newScrollOffset;