@@ -226,7 +226,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
/// If there is any overscroll, it is reported using [didOverscrollBy].
doublesetPixels(doublenewPixels){
assert(_pixels!=null);
assert(SchedulerBinding.instance.schedulerPhase!=SchedulerPhase.persistentCallbacks,'A scrollable\'s position should not change during the build, layout, and paint phases, otherwise the rendering will be confused.');
assert(!_didChangeViewportDimensionOrReceiveCorrection,'Use correctForNewDimensions() (and return true) to change the scroll offset during applyContentDimensions().');
_lastMetrics=copyWith();
returntrue;
}
...
...
@@ -556,7 +546,6 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@mustCallSuper
voidapplyNewDimensions(){
assert(pixels!=null);
assert(_pendingDimensions);
activity.applyNewDimensions();
_updateSemanticActions();// will potentially request a semantics update.