- Inline -> Pargraph. This class is actually a box, not an inline. It's really
a wrapper for RenderParagraph, so Paragraph is the normal name.
- InlineBase -> RenderInline. The name we used in C++ for the base class of
all inlines was RenderInline, which removes the ugly "Base" suffix.
- InlineText -> RenderText. Aligns this name with C++.
- InlineStyle -> RenderStyled. Matches the foregoing pattern.
Now ScrollableBlock can combine a horizontally scrolling viewport with a
horizontal block.
Also rename ViewportScrollDirection to just ScrollDirection for less verbosity.
This ensures we don't run into discontinuities when reversing an
animation halfway through. I refactored AnimationValue to have knowledge
of the reverse curves and intervals.
This refactors Checkbox to own a RenderObject similar to how Switch was
refactored in https://github.com/domokit/sky_engine/pull/376 and
extracts common functionality for toggleable renderers into a base
class. Switch and Checkbox's render objects derive from this base
class to add their own custom painting and theming logic.
This introduces the notion of event disposition and allows event
targets (widgets and render objects) to consume events that should not
be processed further. This is needed by the Switch component in the
Drawer in the stocks example. The Switch is embedded in a DrawerItem.
The Switch handles the gesture tap event to toggle its state and should
handle pointer events to allow swiping and draw its own radial
reaction. The DrawerItem also handles gesture taps to allow toggling
the switch value when tapping anywhere on the drawer and to draw its
own ink splash. When tapping on the switch, both the switch's render
object and the DrawerItem's listener are in the event dispatch path.
The Switch needs to signal in some fashion that it consumed the event
so the DrawerItem does not also try to toggle the switch's state.
We were applying the style to the RenderInline but we actually needed to apply
it to the RenderParagraph. The lineHeight property had the same problem.
When embedded by the view_manager, sometimes we receive pointerup or
pointercancel events without having received a cooresponding pointerdown event.
The underlying issue is that the view_manager doesn't capture on pointerdown
and instead performs a new hit test for every pointer event. We should fix that
in view_manager, but, in the meantime, this patch makes us not crash in this
scenario.
Fixes#339
Rather than using a microtask to schedule component build functions, instead
use the scheduler. We now tread building just like layout and painting as a
visual update.
If your constraints are tight when you get laid out, you don't get a
relayout subtree root.
If you don't have a relayout subtree root, and you get marked dirty,
you go through layoutWithoutResize() rather than layout(), so we don't
get a parentUsesSize.
If you're not dirty and your constraints didn't change, layout() skips
your layout.
So then if your initial layout had parentUsesSize:true, and then you
got marked dirty directly, you would set your size with
parentCanUseSize=false, and then later if your parent tried to lay you
out then read your size, it would crash because your size wasn't set
up to allow you to get your size.
The fix is to actually remember the last setting of parentUsesSize,
even in the case of the constraints being tight and you later being
marked as needing layout directly.
This change makes it easier to defined only the width or the height of an image
and let the other value be filled in from the image's intrinsic aspect ratio.
Fixes#175