This widget lets you mimic one of its children in an overlay. The overlay
starts out as the same size of the child and then grows to fill the overlay. In
the future, the mimic will start at the same visual position as the child.
- 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.
Unforutnately since Input won't show text if it doesn't start
with a letter, this actually makes the experiance slightly
worse, but this is definitely the right direction.
@abarth
Wrap widgets you want to reparent in a Mimicable widget and assign the
Mimicable widget a global key. Then, given the same global key to a Mimic
widget to make it appear elsewhere in the view hierarchy.
Now ScrollableBlock can combine a horizontally scrolling viewport with a
horizontal block.
Also rename ViewportScrollDirection to just ScrollDirection for less verbosity.
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.
This changes Switch from being a subclass of the Toggleable widget to
being a standalone Component with a custom RenderObject. This is to
enable adding Switch-specific radial reaction animations in a
subsequent patch. The CustomPaint logic that Toggleable was using does
not provide a nice way for a class and its subclass to both participate
in deciding to repaint.