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;
}
...
...
@@ -569,6 +579,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@mustCallSuper
voidapplyNewDimensions(){
assert(pixels!=null);
assert(_pendingDimensions);
activity.applyNewDimensions();
_updateSemanticActions();// will potentially request a semantics update.