I ran into a case where I was setting minHeight=∞ and then calling
layout() with that constraint, which is all kinds of bad. To try to
catch this earlier, this patch now provides a way to catch constraints
that are requiring infinite values.
We don't _always_ check this because there are valid uses for
BoxConstraints.biggest, e.g. as an additionalConstraint.
Previously we'd snap to the size of the background widget before resizing to
zero. Now we force the background widget to match the size of the dimissable
widget at the time it was dismissed.
Fixes#3092
Previously this was used by MixedViewport, but now we don't need it because
LazyBlockViewport has replaced MixedViewport.
I've also taken this opportunity to modernize RenderBlock.
Previously, we lost sync with the tab view contents when switching tabs. Now we
key the subtrees to make sure they keep their state across tab animations.
Fixes#3147
Fix some legit uses of GlobalKey to specify the type they want.
Fix some sketchy uses of GlobalKey in tests to fake it with "as
dynamic".
Remove some extraneous imports that made the build red.
This patch adds dartdoc to LazyBlock. Also, this patch fixes the scrolling
physics of LazyBlock. Previously, we updated a running simulation only when the
change in scroll behavior changed the current scroll offset. Now we update
running simulations every time the behavior changes because the simulation
might depend on quantities other than the current scroll offset.
- Create a FlutterErrorDetails struct-like class that describes an
exception along with more details that aren't in the exception, like
where it was caught and what was going on when it was caught.
- Provide a FlutterError static API for handling these objects:
- FlutterError.onError which is called whenever Flutter catches an
error.
- FlutterError.reportError() which handles an error.
- FlutterError.dumpErrorToConsole() which is the default behavior
for onError.
- Removes all the existing exception handler callbacks.
- Replaces all the existing places that described exceptions using
debugPrint with calls to FlutterError.reportError().
- Extend lockState() to also catch exceptions, so that we catch
exceptions that happen during finalizers.
- Make the test framework catch errors and treat them as failures.
- Provide a mechanism to override this behavior in the test framework.
- Make the tests that used to depend on the exception handler
callbacks use this new mechanism.
- Make pump() also support the phase argument.
- Improve some tests using these new features.
Fixes#2356, #2988, #2985, #2220.
Adds BuildOwner to manage the dirty list and build processing for
widgets/elements, and adds a widget unit test to make sure separation
is enforced.
Fixes#2723
- Add x and y to the parent data, in case it's useful. In point of fact,
I ended up not needing it.
- Make columnWidths settable rather than having a setter so that the
code in the widgets layer is more idiomatic.
- Teach setFlatChildren about avoiding unnecessary drop/adopt loops.
- Assert that the child list length is correct more aggressively so that
we catch the dumb bug I had more quickly next time.
- Improve the toString() to handle empty tables better.
- Resort the imports in framework.dart.
- Introduce a LocalKey for cases where you don't want to allow use of
GlobalKey.
- Make inflateWidget and deactivateChild public for subclass use.
- Table widget.
- Cell widget.
- TableRow fake widget.
Previously we updated only the reactivated element's inherited widgets. Now we
update all the inherited widgets for the whole subtree that's being
reactivated. We need to visit the whole subtree anyway, so there isn't much of
a loss.
Fixes#2733Fixes#2438Fixes#1701
New RenderAligningShiftedBox abstract class for render boxes with
"alignment", which as of now is:
- RenderPositionedBox
- RenderConstrainedOverflowBox (ex RenderOverflowBox)
- RenderSizedOverflowBox
- RenderFractionallySizedOverflowBox (ex RenderFractionallySizedBox)
(The respective widgets are Align, OverflowBox, SizedOverflowBox, and
FractionallySizedBox. They haven't been renamed.)
Also I added some toString details.