Commit b0e0e65c authored by Hans Muller's avatar Hans Muller

Fixed several typos

parent 4d2e8de2
...@@ -41,8 +41,8 @@ class VariableHeightScrollable extends Scrollable { ...@@ -41,8 +41,8 @@ class VariableHeightScrollable extends Scrollable {
if (layoutState != source.layoutState) { if (layoutState != source.layoutState) {
// Warning: this is unlikely to be what you intended. // Warning: this is unlikely to be what you intended.
assert(source.layoutState != null); assert(source.layoutState != null);
layoutState == source.layoutState;
layoutState.removeListener(_handleLayoutChanged); layoutState.removeListener(_handleLayoutChanged);
layoutState = source.layoutState;
layoutState.addListener(_handleLayoutChanged); layoutState.addListener(_handleLayoutChanged);
} }
super.syncFields(source); super.syncFields(source);
...@@ -55,6 +55,11 @@ class VariableHeightScrollable extends Scrollable { ...@@ -55,6 +55,11 @@ class VariableHeightScrollable extends Scrollable {
scrollBehavior.containerSize = newSize.height; scrollBehavior.containerSize = newSize.height;
} }
void didUnmount() {
layoutState.removeListener(_handleLayoutChanged);
super.didUnmount();
}
void _handleLayoutChanged() { void _handleLayoutChanged() {
if (layoutState.didReachLastChild) { if (layoutState.didReachLastChild) {
scrollBehavior.contentsSize = layoutState.contentsSize; scrollBehavior.contentsSize = layoutState.contentsSize;
......
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