
Previously, if a StatefulWidget was marked dirty, then removed from the build, then reinserted using the exact same widget under a widget under a LayoutBuilder, it wouldn't rebuild. This fixes that. It also introduces an assert that's supposed to catch SizeObserver-like behaviour. Rather than make this patch even bigger, I papered over two pre-existing bugs which this assert uncovered (and fixed the other problems it found): https://github.com/flutter/flutter/issues/5751 https://github.com/flutter/flutter/issues/5749 We should fix those before 1.0 though.
microbenchmarks
To run these benchmarks on a device:
flutter run --release -t lib/gestures/velocity_tracker_data.dart
flutter run --release -t lib/stocks/animation_bench.dart
flutter run --release -t lib/stocks/build_bench.dart
flutter run --release -t lib/stocks/layout_bench.dart
The results should be in the device logs.