Factor out a reusable interface called Decoration from BoxDecoration.
Make all the consumers of BoxDecoration and the erstwhile BoxPainter
into consumers of Decoration.
Make a BoxPainter be something you get from a Decoration, rather than
something to which you pass a BoxDecoration.
Rename Shape to BoxShape now that it's documented specifically as
applying to boxes.
Move EdgeDims to its own file.
Move FractionalOffset up so that it's with the other helper classes in
its file rather than alone at the end.
Minor change to RenderClipOval's hit testing to avoid taking an
unnecessary square root.
Rename BoxDecorationPosition to DecorationPosition since
RenderDecoratedBox now takes any Decoration.
Implement hit testing for rounded rects.
Rename AnimatedBoxDecorationValue to AnimatedDecorationValue, and make
it support lerping across any Decoration (by deferring to the objects
involved).
- drag and drop was using the wrong draggables (long press vs short
press).
- navigation.dart wasn't using material correctly and so was ending up
with some red text.
- piano wasn't followig our style guide even a little.
- date picker was not scrollable.
Draggable is now itself a gesture arena member. This means it won't
conflict with other gesture recognisers in the same path.
This also allows variants of Draggable that are triggered by other
gestures.
Also, some cleanup of DoubleTapGestureRecognizer, GestureDetector, and
PrimaryPointerGestureRecognizer.
Also, make MultiTapGestureRecognizer support a timeout for longpress.
Also, make Draggable data be typed.
Also, hide warnings about constructor warnings for now. Analyzer doesn't
support them yet. (Have to do this on a per-line basis)
Directions for future research:
- animating the avatar (enter/exit transitions)
- interaction with the navigator (canceling a drag on page navigation, etc)
- double-tap draggable
- Change RouteArguments to pass the route's BuildContext rather than
the Navigator. This caused the bulk of the examples/ and .../test/
changes (those are mostly mechanical changes). It also meant I could
simplify Navigator.of().
- Make initState() actually get called when the State's Element is in
the tree, so you can use Foo.of() functions there. Added a test for
this also.
- Provide a RouteWidget so that routes have a position in the Widget
tree. The bulk of the route logic is still in a longer-lived Route
object for now.
- Make Route.setState() only rebuild the actual route, not the whole
navigator.
- Provided a Route.of().
- Provided a Route.writeState / Route.readState API that tries to
identify the clients by their runtimeType, their key, and their
ancestors keys, up to the nearest ancestor with a GlobalKey.
- Made scrollables hook into this API to track state. Added a test to
make sure this works.
- Fix the debug output of GestureDetector and the hashCode of
MixedViewport.
- Fixed ScrollableWidgetListState<T> to handle infinite lists.
(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.
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.
Introduce a Draggable class that wraps all the logic of dragging
something and dropping it on a DragTarget.
Update examples/widgets/drag_and_drop.dart accordingly.
Make the performance/transition part of routes optional.
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
Widgets that want to receive drops should include a DropTarget in their build.
Currently there's no widget for initiating a drag. Components can use the
DragController directly. In the future, we'll probably want to add a Draggable
that knows how to do some of this work automatically.
Fixes#612