pub struct InkResponse {Show 40 fields
pub key: Option<KeyRef>,
pub child: Option<WidgetRef>,
pub on_tap: Option<GestureTapCallback>,
pub on_tap_down: Option<GestureTapDownCallback>,
pub on_tap_up: Option<GestureTapUpCallback>,
pub on_tap_cancel: Option<GestureTapCallback>,
pub on_double_tap: Option<GestureTapCallback>,
pub on_long_press: Option<GestureLongPressCallback>,
pub on_long_press_up: Option<GestureLongPressUpCallback>,
pub on_secondary_tap: Option<GestureTapCallback>,
pub on_secondary_tap_down: Option<GestureTapDownCallback>,
pub on_secondary_tap_up: Option<GestureTapUpCallback>,
pub on_secondary_tap_cancel: Option<GestureTapCallback>,
pub on_tertiary_tap_down: Option<GestureTapDownCallback>,
pub on_tertiary_tap_up: Option<GestureTapUpCallback>,
pub on_tertiary_tap_cancel: Option<GestureTapCancelCallback>,
pub on_highlight_changed: Option<ValueChanged<bool>>,
pub on_hover: Option<ValueChanged<bool>>,
pub mouse_cursor: Option<MouseCursorRef>,
pub contained_ink_well: bool,
pub highlight_shape: BoxShape,
pub radius: Option<f64>,
pub border_radius: Option<BorderRadius>,
pub custom_border: Option<ShapeBorderRef>,
pub focus_color: Option<Color>,
pub hover_color: Option<Color>,
pub highlight_color: Option<Color>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub splash_color: Option<Color>,
pub splash_factory: Option<InteractiveInkFeatureFactoryRef>,
pub enable_feedback: bool,
pub exclude_from_semantics: bool,
pub on_focus_change: Option<ValueChanged<bool>>,
pub autofocus: bool,
pub focus_node: Option<FocusNodeRef>,
pub can_request_focus: bool,
pub states_controller: Option<Ref<MaterialStatesController>>,
pub hover_duration: Option<Duration>,
pub get_rect_callback: GetRectCallback,
pub debug_check_context: CheckContext,
}Expand description
An area of a Material that responds to touch. Has a configurable shape and
can be configured to clip splashes that extend outside its bounds or not.
For a variant of this widget that is specialized for rectangular areas that
always clip splashes, see InkWell.
An InkResponse widget does two things when responding to a tap:
-
It starts to animate a highlight. The shape of the highlight is determined by
highlight_shape. If it is aBoxShape::Circle, the default, then the highlight is a circle of fixed size centered in theInkResponse. If it isBoxShape::Rectangle, then the highlight is a box the size of theInkResponseitself, unlessget_rect_callbackis provided, in which case that callback defines the rectangle. The color of the highlight is set byhighlight_color. -
Simultaneously, it starts to animate a splash. This is a growing circle initially centered on the tap location. If this is a
contained_ink_well, the splash grows to theradiuswhile remaining centered at the tap location. Otherwise, the splash migrates to the center of the box as it grows.
The main thing to notice is that the splashes happily exceed the bounds of the widget
(because contained_ink_well is false).
The InkResponse widget must have a Material widget as an ancestor. The
Material widget is where the ink reactions are actually painted. This
matches the Material Design premise wherein the Material is what is
actually reacting to touches by spreading ink.
If a Widget uses this class directly, it should include the following line
at the top of its build function to call debug_check_has_material:
debug_assert!(debug_check_has_material(app, context));§Troubleshooting
§The ink splashes aren’t visible!
If there is an opaque graphic, e.g. painted using a Container, Image, or
DecoratedBox, between the Material widget and the InkResponse widget,
then the splash won’t be visible because it will be under the opaque graphic.
This is because ink splashes draw on the underlying Material itself, as
if the ink was spreading inside the material.
The Ink widget can be used as a replacement for Image, Container, or
DecoratedBox to ensure that the image or decoration also paints in the
Material itself, below the ink.
If this is not possible for some reason, e.g. because you are using an
opaque CustomPaint widget, alternatively consider using a second
Material above the opaque widget but below the InkResponse (as an
ancestor to the ink response). The MaterialType::Transparency
material kind can be used for this purpose.
See also:
GestureDetector, for listening for gestures without ink splashes.ElevatedButtonandTextButton, two kinds of buttons in Material Design.IconButton, which combinesInkResponsewith anIcon.
Fields§
§key: Option<KeyRef>§child: Option<WidgetRef>The widget below this widget in the tree.
on_tap: Option<GestureTapCallback>Called when the user taps this part of the material.
on_tap_down: Option<GestureTapDownCallback>Called when the user taps down this part of the material.
on_tap_up: Option<GestureTapUpCallback>Called when the user releases a tap that was started on this part of the
material. on_tap is called immediately after.
on_tap_cancel: Option<GestureTapCallback>Called when the user cancels a tap that was started on this part of the material.
on_double_tap: Option<GestureTapCallback>Called when the user double taps this part of the material.
on_long_press: Option<GestureLongPressCallback>Called when the user long-presses on this part of the material.
on_long_press_up: Option<GestureLongPressUpCallback>Called when the user lifts their finger after a long press on the button.
This callback is triggered at the end of a long press gesture, specifically after the user holds a long press and then releases it. It does not include position details.
Common use cases include performing an action only after the long press completes, such as displaying a context menu or confirming a held gesture.
See also:
on_long_press, which is triggered when the long press gesture is first recognized.
on_secondary_tap: Option<GestureTapCallback>Called when the user taps this part of the material with a secondary button.
See also:
K_SECONDARY_BUTTON, the button this callback responds to.
on_secondary_tap_down: Option<GestureTapDownCallback>Called when the user taps down on this part of the material with a secondary button.
See also:
K_SECONDARY_BUTTON, the button this callback responds to.
on_secondary_tap_up: Option<GestureTapUpCallback>Called when the user releases a secondary button tap that was started on
this part of the material. on_secondary_tap is called
immediately after.
See also:
on_secondary_tap, a handler triggered right after this one that doesn’t pass any details about the tap.K_SECONDARY_BUTTON, the button this callback responds to.
on_secondary_tap_cancel: Option<GestureTapCallback>Called when the user cancels a secondary button tap that was started on this part of the material.
See also:
K_SECONDARY_BUTTON, the button this callback responds to.
on_tertiary_tap_down: Option<GestureTapDownCallback>Called when the user taps down on this part of the material with a tertiary button.
A common use case for the tertiary button is opening a link in a new tab or window with a middle click of a mouse.
See also:
K_TERTIARY_BUTTON, the button this callback responds to.
on_tertiary_tap_up: Option<GestureTapUpCallback>Called when the user releases a tertiary button tap that was started on this part of the material.
See also:
on_tertiary_tap_down, which is called when the tertiary button tap starts.K_TERTIARY_BUTTON, the button this callback responds to.
on_tertiary_tap_cancel: Option<GestureTapCancelCallback>Called when the user cancels a tertiary button tap that was started on this part of the material.
See also:
K_TERTIARY_BUTTON, the button this callback responds to.
on_highlight_changed: Option<ValueChanged<bool>>Called when this part of the material either becomes highlighted or stops being highlighted.
The value passed to the callback is true if this part of the material has become highlighted and false if this part of the material has stopped being highlighted.
If all of on_tap, on_double_tap,
on_long_press, and
on_long_press_up become null while a
gesture is ongoing, then on_tap_cancel will be fired and
on_highlight_changed will be fired with the value false
during the build. This means, for instance, that in that scenario State::set_state
cannot be called.
on_hover: Option<ValueChanged<bool>>Called when a pointer enters or exits the ink response area.
The value passed to the callback is true if a pointer has entered this part of the material and false if a pointer has exited this part of the material.
mouse_cursor: Option<MouseCursorRef>The cursor for a mouse pointer when it enters or is hovering over the widget.
If mouse_cursor is a WidgetStateMouseCursor,
WidgetStateProperty::resolve is used for the following WidgetStates:
If this property is null, WidgetStateMouseCursor::adaptive_clickable will be used.
contained_ink_well: boolWhether this ink response should be clipped its bounds.
This flag also controls whether the splash migrates to the center of the
InkResponse or not. If contained_ink_well is true,
the splash remains centered around the tap location. If it is false, the splash
migrates to the center of the InkResponse as it grows.
See also:
highlight_shape, the shape of the focus, hover, and pressed highlights.border_radius, which controls the corners when the box is a rectangle.get_rect_callback, which controls the size and position of the box when it is a rectangle.
highlight_shape: BoxShapeThe shape (e.g., circle, rectangle) to use for the highlight drawn around this part of the material when pressed, hovered over, or focused.
The same shape is used for the pressed highlight (see
highlight_color), the focus highlight (see
focus_color), and the hover highlight (see
hover_color).
If the shape is BoxShape::Circle, then the highlight is centered on the
InkResponse. If the shape is BoxShape::Rectangle, then the highlight
fills the InkResponse, or the rectangle provided by
get_rect_callback if the callback is specified.
See also:
contained_ink_well, which controls clipping behavior.border_radius, which controls the corners when the box is a rectangle.highlight_color, the color of the highlight.get_rect_callback, which controls the size and position of the box when it is a rectangle.
radius: Option<f64>The radius of the ink splash.
Splashes grow up to this size. By default, this size is determined from
the size of the rectangle provided by get_rect_callback,
or the size of the InkResponse itself.
See also:
splash_color, the color of the splash.splash_factory, which defines the appearance of the splash.
border_radius: Option<BorderRadius>The border radius of the containing rectangle. This is effective only if
highlight_shape is BoxShape::Rectangle.
If this is null, it is interpreted as BorderRadius::ZERO.
custom_border: Option<ShapeBorderRef>The custom clip border.
If this is null, the ink response will not clip its content.
focus_color: Option<Color>The color of the ink response when the parent widget is focused. If this
property is null then the focus color of the theme,
ThemeData::focus_color, will be used.
See also:
highlight_shape, the shape of the focus, hover, and pressed highlights.hover_color, the color of the hover highlight.splash_color, the color of the splash.splash_factory, which defines the appearance of the splash.
hover_color: Option<Color>The color of the ink response when a pointer is hovering over it. If this
property is null then the hover color of the theme,
ThemeData::hover_color, will be used.
See also:
highlight_shape, the shape of the focus, hover, and pressed highlights.highlight_color, the color of the pressed highlight.focus_color, the color of the focus highlight.splash_color, the color of the splash.splash_factory, which defines the appearance of the splash.
highlight_color: Option<Color>The highlight color of the ink response when pressed. If this property is
null then the highlight color of the theme, ThemeData::highlight_color,
will be used.
See also:
hover_color, the color of the hover highlight.focus_color, the color of the focus highlight.highlight_shape, the shape of the focus, hover, and pressed highlights.splash_color, the color of the splash.splash_factory, which defines the appearance of the splash.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>Defines the ink response focus, hover, and splash colors.
This default null property can be used as an alternative to
focus_color, hover_color,
highlight_color, and splash_color.
If non-null, it is resolved against one of WidgetState::Focused,
WidgetState::Hovered, and WidgetState::Pressed. It’s convenient to use when the
parent widget can pass along its own WidgetStateProperty value for the overlay color.
WidgetState::Pressed triggers a ripple (an ink splash), per
the current Material Design spec. The overlay_color doesn’t map
a state to highlight_color because a separate highlight is
not used by the current design guidelines. See
https://material.io/design/interaction/states.html#pressed
If the overlay color is null or resolves to null, then
focus_color, hover_color,
splash_color and their defaults are used instead.
See also:
- The Material Design specification for overlay colors and how they match a component’s state: https://material.io/design/interaction/states.html#anatomy.
splash_color: Option<Color>The splash color of the ink response. If this property is null then the
splash color of the theme, ThemeData::splash_color, will be used.
See also:
splash_factory, which defines the appearance of the splash.radius, the (maximum) size of the ink splash.highlight_color, the color of the highlight.
splash_factory: Option<InteractiveInkFeatureFactoryRef>Defines the appearance of the splash.
Defaults to the value of the theme’s splash factory: ThemeData::splash_factory.
See also:
radius, the (maximum) size of the ink splash.splash_color, the color of the splash.highlight_color, the color of the highlight.InkSplash::splash_factory, which defines the default splash.InkRipple::splash_factory, which defines a splash that spreads out more aggressively than the default.
enable_feedback: boolWhether detected gestures should provide acoustic and/or haptic feedback.
For example, on Android a tap will produce a clicking sound and a long-press will produce a short vibration, when feedback is enabled.
See also:
Feedbackfor providing platform-specific feedback to certain actions.
exclude_from_semantics: boolWhether to exclude the gestures introduced by this widget from the semantics tree.
For example, a long-press gesture for showing a tooltip is usually excluded because the tooltip itself is included in the semantics tree directly and so having a gesture to show it would result in duplication of information.
on_focus_change: Option<ValueChanged<bool>>Handler called when the focus changes.
Called with true if this widget’s node gains focus, and false if it loses focus.
autofocus: boolTrue if this widget will be selected as the initial focus when no other node in its scope is currently focused.
focus_node: Option<FocusNodeRef>An optional focus node to use as the focus node for this widget.
can_request_focus: boolIf true, this widget may request the primary focus.
states_controller: Option<Ref<MaterialStatesController>>Represents the interactive “state” of this widget in terms of
a set of WidgetStates, like WidgetState::Pressed and
WidgetState::Focused.
Classes based on this one can provide their own
WidgetStatesController to which they’ve added listeners.
They can also update the controller’s WidgetStatesController::value
however, this may only be done when it’s safe to call
State::set_state, like in an event handler.
hover_duration: Option<Duration>The duration of the animation that animates the hover effect.
The default is 50ms.
get_rect_callback: GetRectCallbackDart’s getRectCallback override point, which a widget that specializes
InkResponse fills through
override_get_rect_callback;
get_rect_callback calls it.
debug_check_context: CheckContextDart’s debugCheckContext override point, which a widget that specializes
InkResponse fills through
override_debug_check_context.
Dart’s method is @mustCallSuper: a filler also runs
InkResponse::debug_check_context.
Implementations§
Source§impl InkResponse
impl InkResponse
Sourcepub fn new() -> InkResponse
pub fn new() -> InkResponse
Sourcepub fn key(self, key: KeyRef) -> InkResponse
pub fn key(self, key: KeyRef) -> InkResponse
Dart InkResponse(key:).
Sourcepub fn on_tap(self, on_tap: GestureTapCallback) -> InkResponse
pub fn on_tap(self, on_tap: GestureTapCallback) -> InkResponse
Dart InkResponse(on_tap:).
Sourcepub fn on_tap_down(self, on_tap_down: GestureTapDownCallback) -> InkResponse
pub fn on_tap_down(self, on_tap_down: GestureTapDownCallback) -> InkResponse
Dart InkResponse(on_tap_down:).
Sourcepub fn on_tap_up(self, on_tap_up: GestureTapUpCallback) -> InkResponse
pub fn on_tap_up(self, on_tap_up: GestureTapUpCallback) -> InkResponse
Dart InkResponse(on_tap_up:).
Sourcepub fn on_tap_cancel(self, on_tap_cancel: GestureTapCallback) -> InkResponse
pub fn on_tap_cancel(self, on_tap_cancel: GestureTapCallback) -> InkResponse
Dart InkResponse(on_tap_cancel:).
Sourcepub fn on_double_tap(self, on_double_tap: GestureTapCallback) -> InkResponse
pub fn on_double_tap(self, on_double_tap: GestureTapCallback) -> InkResponse
Dart InkResponse(on_double_tap:).
Sourcepub fn on_long_press(
self,
on_long_press: GestureLongPressCallback,
) -> InkResponse
pub fn on_long_press( self, on_long_press: GestureLongPressCallback, ) -> InkResponse
Dart InkResponse(on_long_press:).
Sourcepub fn on_long_press_up(
self,
on_long_press_up: GestureLongPressUpCallback,
) -> InkResponse
pub fn on_long_press_up( self, on_long_press_up: GestureLongPressUpCallback, ) -> InkResponse
Dart InkResponse(on_long_press_up:).
Sourcepub fn on_secondary_tap(
self,
on_secondary_tap: GestureTapCallback,
) -> InkResponse
pub fn on_secondary_tap( self, on_secondary_tap: GestureTapCallback, ) -> InkResponse
Dart InkResponse(on_secondary_tap:).
Sourcepub fn on_secondary_tap_up(
self,
on_secondary_tap_up: GestureTapUpCallback,
) -> InkResponse
pub fn on_secondary_tap_up( self, on_secondary_tap_up: GestureTapUpCallback, ) -> InkResponse
Dart InkResponse(on_secondary_tap_up:).
Sourcepub fn on_secondary_tap_down(
self,
on_secondary_tap_down: GestureTapDownCallback,
) -> InkResponse
pub fn on_secondary_tap_down( self, on_secondary_tap_down: GestureTapDownCallback, ) -> InkResponse
Dart InkResponse(on_secondary_tap_down:).
Sourcepub fn on_secondary_tap_cancel(
self,
on_secondary_tap_cancel: GestureTapCallback,
) -> InkResponse
pub fn on_secondary_tap_cancel( self, on_secondary_tap_cancel: GestureTapCallback, ) -> InkResponse
Dart InkResponse(on_secondary_tap_cancel:).
Sourcepub fn on_tertiary_tap_up(
self,
on_tertiary_tap_up: GestureTapUpCallback,
) -> InkResponse
pub fn on_tertiary_tap_up( self, on_tertiary_tap_up: GestureTapUpCallback, ) -> InkResponse
Dart InkResponse(on_tertiary_tap_up:).
Sourcepub fn on_tertiary_tap_down(
self,
on_tertiary_tap_down: GestureTapDownCallback,
) -> InkResponse
pub fn on_tertiary_tap_down( self, on_tertiary_tap_down: GestureTapDownCallback, ) -> InkResponse
Dart InkResponse(on_tertiary_tap_down:).
Sourcepub fn on_tertiary_tap_cancel(
self,
on_tertiary_tap_cancel: GestureTapCancelCallback,
) -> InkResponse
pub fn on_tertiary_tap_cancel( self, on_tertiary_tap_cancel: GestureTapCancelCallback, ) -> InkResponse
Dart InkResponse(on_tertiary_tap_cancel:).
Sourcepub fn on_highlight_changed(
self,
on_highlight_changed: ValueChanged<bool>,
) -> InkResponse
pub fn on_highlight_changed( self, on_highlight_changed: ValueChanged<bool>, ) -> InkResponse
Dart InkResponse(on_highlight_changed:).
Sourcepub fn on_hover(self, on_hover: ValueChanged<bool>) -> InkResponse
pub fn on_hover(self, on_hover: ValueChanged<bool>) -> InkResponse
Dart InkResponse(on_hover:).
Sourcepub fn mouse_cursor(self, mouse_cursor: MouseCursorRef) -> InkResponse
pub fn mouse_cursor(self, mouse_cursor: MouseCursorRef) -> InkResponse
Dart InkResponse(mouse_cursor:).
Sourcepub fn radius(self, radius: f64) -> InkResponse
pub fn radius(self, radius: f64) -> InkResponse
Dart InkResponse(radius:).
Sourcepub fn border_radius(self, border_radius: BorderRadius) -> InkResponse
pub fn border_radius(self, border_radius: BorderRadius) -> InkResponse
Dart InkResponse(border_radius:).
Sourcepub fn focus_color(self, focus_color: Color) -> InkResponse
pub fn focus_color(self, focus_color: Color) -> InkResponse
Dart InkResponse(focus_color:).
Sourcepub fn hover_color(self, hover_color: Color) -> InkResponse
pub fn hover_color(self, hover_color: Color) -> InkResponse
Dart InkResponse(hover_color:).
Sourcepub fn highlight_color(self, highlight_color: Color) -> InkResponse
pub fn highlight_color(self, highlight_color: Color) -> InkResponse
Dart InkResponse(highlight_color:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> InkResponse
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> InkResponse
Dart InkResponse(overlay_color:).
Sourcepub fn splash_color(self, splash_color: Color) -> InkResponse
pub fn splash_color(self, splash_color: Color) -> InkResponse
Dart InkResponse(splash_color:).
Sourcepub fn splash_factory(
self,
splash_factory: InteractiveInkFeatureFactoryRef,
) -> InkResponse
pub fn splash_factory( self, splash_factory: InteractiveInkFeatureFactoryRef, ) -> InkResponse
Dart InkResponse(splash_factory:).
Sourcepub fn on_focus_change(self, on_focus_change: ValueChanged<bool>) -> InkResponse
pub fn on_focus_change(self, on_focus_change: ValueChanged<bool>) -> InkResponse
Dart InkResponse(on_focus_change:).
Sourcepub fn focus_node(self, focus_node: FocusNodeRef) -> InkResponse
pub fn focus_node(self, focus_node: FocusNodeRef) -> InkResponse
Dart InkResponse(focus_node:).
Sourcepub fn states_controller(
self,
states_controller: Ref<MaterialStatesController>,
) -> InkResponse
pub fn states_controller( self, states_controller: Ref<MaterialStatesController>, ) -> InkResponse
Dart InkResponse(states_controller:).
Sourcepub fn hover_duration(self, hover_duration: Duration) -> InkResponse
pub fn hover_duration(self, hover_duration: Duration) -> InkResponse
Dart InkResponse(hover_duration:).
Sourcepub fn enable_feedback(self, enable_feedback: bool) -> InkResponse
pub fn enable_feedback(self, enable_feedback: bool) -> InkResponse
Dart InkResponse(enable_feedback:).
Sourcepub fn exclude_from_semantics(self, exclude_from_semantics: bool) -> InkResponse
pub fn exclude_from_semantics(self, exclude_from_semantics: bool) -> InkResponse
Dart InkResponse(exclude_from_semantics:).
Sourcepub fn can_request_focus(self, can_request_focus: bool) -> InkResponse
pub fn can_request_focus(self, can_request_focus: bool) -> InkResponse
Dart InkResponse(can_request_focus:).
Sourcepub fn autofocus(self, autofocus: bool) -> InkResponse
pub fn autofocus(self, autofocus: bool) -> InkResponse
Dart InkResponse(autofocus:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> InkResponse
pub fn child<K>(self, child: impl IntoWidget<K>) -> InkResponse
Dart InkResponse(child:).
Sourcepub fn custom_border(
self,
custom_border: impl Into<ShapeBorderRef>,
) -> InkResponse
pub fn custom_border( self, custom_border: impl Into<ShapeBorderRef>, ) -> InkResponse
Dart InkResponse(customBorder:).
Sourcepub fn override_get_rect_callback(
self,
get_rect_callback: impl Fn(&App, AnyRenderBox) -> Option<RectCallback> + 'static,
) -> InkResponse
pub fn override_get_rect_callback( self, get_rect_callback: impl Fn(&App, AnyRenderBox) -> Option<RectCallback> + 'static, ) -> InkResponse
Dart’s override of getRectCallback in a subclass: see
InkResponse::get_rect_callback.
Sourcepub fn override_debug_check_context(
self,
debug_check_context: impl Fn(&App, BuildContext) -> bool + 'static,
) -> InkResponse
pub fn override_debug_check_context( self, debug_check_context: impl Fn(&App, BuildContext) -> bool + 'static, ) -> InkResponse
Dart’s override of debugCheckContext in a subclass: see
InkResponse::debug_check_context.
Dart’s method is @mustCallSuper: debug_check_context also runs
InkResponse::debug_check_context.
Sourcepub fn contained_ink_well(self, contained_ink_well: bool) -> InkResponse
pub fn contained_ink_well(self, contained_ink_well: bool) -> InkResponse
Dart InkResponse(contained_ink_well:).
Sourcepub fn highlight_shape(self, highlight_shape: BoxShape) -> InkResponse
pub fn highlight_shape(self, highlight_shape: BoxShape) -> InkResponse
Dart InkResponse(highlight_shape:).
Sourcepub fn get_rect_callback(
&self,
app: &App,
reference_box: AnyRenderBox,
) -> Option<RectCallback>
pub fn get_rect_callback( &self, app: &App, reference_box: AnyRenderBox, ) -> Option<RectCallback>
The rectangle to use for the highlight effect and for clipping
the splash effects if contained_ink_well is true.
This method is intended to be overridden by descendants that
specialize InkResponse for unusual cases. For example,
TableRowInkWell implements this method to return the rectangle
corresponding to the row that the widget is in.
The default behavior returns null, which is equivalent to returning the reference_box argument’s bounding box (though slightly more efficient).
Sourcepub fn debug_check_context(app: &App, context: BuildContext) -> bool
pub fn debug_check_context(app: &App, context: BuildContext) -> bool
Asserts that the given context satisfies the prerequisites for this class.
This method is intended to be overridden by descendants that
specialize InkResponse for unusual cases. For example,
TableRowInkWell implements this method to verify that the widget is
in a table.
Trait Implementations§
Source§impl Clone for InkResponse
impl Clone for InkResponse
Source§impl Debug for InkResponse
impl Debug for InkResponse
Source§impl Default for InkResponse
impl Default for InkResponse
Source§fn default() -> InkResponse
fn default() -> InkResponse
Source§impl StatelessWidget for InkResponse
impl StatelessWidget for InkResponse
Source§fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for InkResponse
impl !Send for InkResponse
impl !Sync for InkResponse
impl !UnwindSafe for InkResponse
impl Forget for InkResponse
impl Freeze for InkResponsewhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
NonZero<u32>: Freeze,
*const (): Freeze,
*const RcInner<dyn Fn(&mut App, TapDownDetails)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, TapDownDetails)>>: Freeze,
*const RcInner<dyn Fn(&mut App, TapUpDetails)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, TapUpDetails)>>: Freeze,
*const RcInner<dyn Fn(&mut App, bool)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, bool)>>: Freeze,
*const RcInner<dyn MouseCursor> is !null: Freeze,
PhantomData<RcInner<dyn MouseCursor>>: Freeze,
*const RcInner<dyn ShapeBorder> is !null: Freeze,
PhantomData<RcInner<dyn ShapeBorder>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: Freeze,
*const RcInner<dyn InteractiveInkFeatureFactory> is !null: Freeze,
PhantomData<RcInner<dyn InteractiveInkFeatureFactory>>: Freeze,
&'static FocusNodeVTable: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
PhantomData<fn() -> WidgetStatesController>: Freeze,
*const RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>>: Freeze,
*const RcInner<dyn Fn(&App, AnyElement) -> bool> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App, AnyElement) -> bool>>: Freeze,
impl Move for InkResponse
impl Unpin for InkResponsewhere
Rc<dyn Key>: Unpin,
Rc<dyn Widget>: Unpin,
Rc<dyn Fn(&mut App)>: Unpin,
NonZero<u32>: Unpin,
*const (): Unpin,
Rc<dyn Fn(&mut App, TapDownDetails)>: Unpin,
Rc<dyn Fn(&mut App, TapUpDetails)>: Unpin,
Rc<dyn Fn(&mut App, bool)>: Unpin,
Rc<dyn MouseCursor>: Unpin,
Rc<dyn ShapeBorder>: Unpin,
Rc<dyn WidgetStateProperty<Option<Color>>>: Unpin,
Rc<dyn InteractiveInkFeatureFactory>: Unpin,
&'static FocusNodeVTable: Unpin,
Rc<Keep>: Unpin,
Rc<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>: Unpin,
Rc<dyn Fn(&App, AnyElement) -> bool>: Unpin,
impl UnsafeUnpin for InkResponsewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, TapDownDetails)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, TapDownDetails)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, TapUpDetails)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, TapUpDetails)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, bool)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, bool)>>: UnsafeUnpin,
*const RcInner<dyn MouseCursor> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn MouseCursor>>: UnsafeUnpin,
*const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: UnsafeUnpin,
*const RcInner<dyn InteractiveInkFeatureFactory> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn InteractiveInkFeatureFactory>>: UnsafeUnpin,
&'static FocusNodeVTable: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
PhantomData<fn() -> WidgetStatesController>: UnsafeUnpin,
*const RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&App, AnyElement) -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App, AnyElement) -> bool>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.