Make Radio widgets take a type that describes the type of their value,
so that you can catch when you use the wrong value.
Standardise on ValueChanged<Foo> instead of having a FooValueChanged
for every value of Foo.
Enabled displaying a scrollbar in ScrollingLists. The scrollbar is painted as an "overlay", i.e. it's painted on top of the scrolling list's visible children.
Added an abstract Painter base class that encapsulates a paint method and the renderer that it's attached to. RenderBlockViewport and HomogenousViewport now support an overlayPainter property. If specified, RenderBlockViewport attaches itself to the overlayPainter when it's attached to the rendering tree. RenderBlockViewport now calls overlayPainter.paint() after it has painted its children.
Added an abstract ScrollingListPainter class that exposes ScrollingList's state which might be needed for painting. Like its scroll direction and scrollOffset. The ScrollingListPainter is notified when a scroll starts and ends.
Defined a Material-specific ScrollingListPainter that renders a scrollbar. The scrollbar thumb is faded in/out when the scroll starts/ends.
Added onScrollStart and onScrollEnd listeners to Scrollable.
Also, fix warnings in rendering/sector_layout.dart
Also, fix hit testing in rendering/sector_layout.dart
Also, add WidgetToRenderBoxAdapter
Also, make the rendering library debugging tools more resilient to
dumping stuff before layout is complete.
Added horizontal and vertical alignment properties to Stack so that the origin of non-positioned children can be specified. Currently all of the non-positioned children just end up with their top-left at 0,0. Now, for example, you can center the children by specifying verticalAlignment: 0.5, horizontalAlignment: 0.5.
Added IndexedStack which only paints the stack child specified by the index property. Since it's a Stack, it's as big as the biggest non-positioned child. This component will be essential for building mobile drop down menus.
Added a (likely temporary) example that demonstrates IndexedStack.
Previously, RenderObjectElements didn't support being marked dirty. This
is fine, except for MixedViewport and HomogeneousViewport, which have
builder functions to which they hand themselves as a BuildContext. If
those builder functions call, e.g., Theme.of(), then when the theme
changes, the Inherited logic tries to tell the RenderObjectElement
object that its dependencies changed and that doesn't go down well.
This patch fixes this by making RenderObjectElement a BuildableElement,
and making MixedViewport and HomogeneousViewport hook into that to
rebuild themselves appropriately.
Also, this was only found at all because ThemeData didn't implement
operator==, so we were aggressively marking the entire tree dirty all
the time. That's fixed here too.
Also, I changed card_collection.dart to have more features to make this
easier to test. This found bugs #1524, #1522, #1528, #1529, #1530, #1531.
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)
- Change RouteBuilder's signature to take a single argument in which the
other fields are placed, so that we can keep iterating on those
arguments without having to break compatibility each time. Also, this
makes defining route builders much simpler (only one argument to
ignore rather than a variable number).
- Expose the next performance to RouteBuilders, since sometimes the
route itself might not be where it's used.
- Allow BuildContext to be used to walk children, just like it can for
ancestors
- Allow BuildContext to be used to get the Widget of the current
BuildContext
- Allow StatefulComponentElement to be referenced with a type
specialisation so that you don't have to cast when you know what the
type you're dealing with actually is.
This patch simplifies AnimationTiming and all the AnimatedValue base classes.
Also, make PopupMenu a stateless component because it has no state.
Fixes#1168
This patch converts drawer to using the "openDialog" pattern for managing its
state. Currently, the drawer entrance and exit animation aren't integrated with
the navigator's animation system because the drawer's animations can be stopped
and reversed, which the navigator can't yet understand. That means dismissing
the drawer via the system back button causes the drawer to be removed
instanteously.
Fixes#715Fixes#1187
The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.
The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
You can now set an offset that will be used for the hit testing for
drops. (It doesn't move the feedback by default; use a Transform for
that.) I also made the default feedback not be Opacity 0.5 always.