Commit 42f48b0f authored by Hans Muller's avatar Hans Muller

Fix _scrollOffsetIsInBounds analayzer warning

parent 1d661842
......@@ -126,7 +126,10 @@ abstract class ScrollableState<T extends Scrollable> extends State<T> {
}
bool _scrollOffsetIsInBounds(double offset) {
return offset >= scrollBehavior.minScrollOffset && offset < scrollBehavior.maxScrollOffset;
if (scrollBehavior is! ExtentScrollBehavior)
return false;
ExtentScrollBehavior behavior = scrollBehavior as ExtentScrollBehavior;
return offset >= behavior.minScrollOffset && offset < behavior.maxScrollOffset;
}
double _alignedScrollSnapOffset(double offset) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment