pub struct MaterialStateUnderlineInputBorder { /* private fields */ }Use WidgetStateInputBorder instead. Renamed to match other WidgetStateProperty objects. This feature was deprecated after v3.26.0-0.1.pre.
Expand description
Defines a UnderlineInputBorder that is also a MaterialStateProperty.
This class exists to enable widgets with UnderlineInputBorder valued properties
to also accept MaterialStateProperty<UnderlineInputBorder> values. A material
state input border property represents an input border which depends on
a widget’s “interactive state”. This state is represented as a
set of MaterialStates, like WidgetState::Pressed,
WidgetState::Focused and WidgetState::Hovered.
MaterialStateUnderlineInputBorder should only be used with widgets that document
their support, like InputDecoration.border.
To use a MaterialStateUnderlineInputBorder, use
MaterialStateUnderlineInputBorder::resolve_with and pass in a callback that
will be used to resolve the color in the given states.
If a MaterialStateUnderlineInputBorder is used for a property or a parameter that doesn’t
support resolving MaterialStateProperty<UnderlineInputBorder>s, then its default color
value will be used for all states.
It is itself an InputBorder: the default UnderlineInputBorder() it extends in Dart.
Implementations§
Source§impl MaterialStateUnderlineInputBorder
impl MaterialStateUnderlineInputBorder
Sourcepub fn resolve_with(
callback: impl Fn(&WidgetStates) -> InputBorderRef + 'static,
) -> MaterialStateUnderlineInputBorder
👎Deprecated: Use WidgetStateInputBorder.resolveWith() instead. Renamed to match other WidgetStateProperty objects. This feature was deprecated after v3.26.0-0.1.pre.
pub fn resolve_with( callback: impl Fn(&WidgetStates) -> InputBorderRef + 'static, ) -> MaterialStateUnderlineInputBorder
Use WidgetStateInputBorder.resolveWith() instead. Renamed to match other WidgetStateProperty objects. This feature was deprecated after v3.26.0-0.1.pre.
Creates a MaterialStateUnderlineInputBorder from a
MaterialPropertyResolver<InputBorder> callback function.
If used as a regular input border, the border resolved in the default state (the empty set of states) will be used.
The given callback parameter must return a non-null text style in the default state.
Trait Implementations§
Source§impl InputBorder for MaterialStateUnderlineInputBorder
impl InputBorder for MaterialStateUnderlineInputBorder
Source§fn border_side(&self) -> BorderSide
fn border_side(&self) -> BorderSide
Source§fn copy_with(&self, border_side: Option<BorderSide>) -> InputBorderRef
fn copy_with(&self, border_side: Option<BorderSide>) -> InputBorderRef
border_side.Source§fn is_outline(&self) -> bool
fn is_outline(&self) -> bool
InputDecorator’s container. Read moreSource§fn paint(
&self,
canvas: &mut Canvas,
rect: Rect,
gap_start: Option<f64>,
gap_extent: f64,
gap_percentage: f64,
text_direction: Option<TextDirection>,
)
fn paint( &self, canvas: &mut Canvas, rect: Rect, gap_start: Option<f64>, gap_extent: f64, gap_percentage: f64, text_direction: Option<TextDirection>, )
canvas. Read moreSource§fn as_widget_state_property(
&self,
) -> Option<&dyn WidgetStateProperty<InputBorderRef>>
fn as_widget_state_property( &self, ) -> Option<&dyn WidgetStateProperty<InputBorderRef>>
border is WidgetStateProperty<InputBorder>: this border as the property it
also is, for the borders that implement WidgetStateProperty (WidgetStateInputBorder
and the deprecated MaterialState input borders).Source§impl ShapeBorder for MaterialStateUnderlineInputBorder
impl ShapeBorder for MaterialStateUnderlineInputBorder
Source§fn dimensions(&self) -> EdgeInsetsGeometry
fn dimensions(&self) -> EdgeInsetsGeometry
EdgeInsetsGeometry.Source§fn scale(&self, t: f64) -> ShapeBorderRef
fn scale(&self, t: f64) -> ShapeBorderRef
t.Source§fn lerp_from(
&self,
a: Option<&dyn ShapeBorder>,
t: f64,
) -> Option<ShapeBorderRef>
fn lerp_from( &self, a: Option<&dyn ShapeBorder>, t: f64, ) -> Option<ShapeBorderRef>
Source§fn lerp_to(&self, b: Option<&dyn ShapeBorder>, t: f64) -> Option<ShapeBorderRef>
fn lerp_to(&self, b: Option<&dyn ShapeBorder>, t: f64) -> Option<ShapeBorderRef>
Source§fn get_outer_path(
&self,
rect: Rect,
text_direction: Option<TextDirection>,
) -> Path
fn get_outer_path( &self, rect: Rect, text_direction: Option<TextDirection>, ) -> Path
Path that describes the outer edge of the border.Source§fn get_inner_path(
&self,
rect: Rect,
text_direction: Option<TextDirection>,
) -> Path
fn get_inner_path( &self, rect: Rect, text_direction: Option<TextDirection>, ) -> Path
Path that describes the inner edge of the border.Source§fn paint_interior(
&self,
canvas: &mut Canvas,
rect: Rect,
paint: &Paint,
text_direction: Option<TextDirection>,
)
fn paint_interior( &self, canvas: &mut Canvas, rect: Rect, paint: &Paint, text_direction: Option<TextDirection>, )
Source§fn prefer_paint_interior(&self) -> bool
fn prefer_paint_interior(&self) -> bool
paint_interior is implemented.Source§fn eq_shape(&self, other: &dyn ShapeBorder) -> bool
fn eq_shape(&self, other: &dyn ShapeBorder) -> bool
== is identity; subclasses that override
== implement this.Source§fn add(&self, other: &ShapeBorderRef, reversed: bool) -> Option<ShapeBorderRef>
fn add(&self, other: &ShapeBorderRef, reversed: bool) -> Option<ShapeBorderRef>
this border and the other border. Read moreSource§fn hit_test(
&self,
rect: Rect,
position: Offset,
text_direction: Option<TextDirection>,
) -> bool
fn hit_test( &self, rect: Rect, position: Offset, text_direction: Option<TextDirection>, ) -> bool
position.Source§fn as_outlined_border(&self) -> Option<&(dyn OutlinedBorder + 'static)>
fn as_outlined_border(&self) -> Option<&(dyn OutlinedBorder + 'static)>
OutlinedBorder downcast for Dart’s is OutlinedBorder.Source§fn into_outlined_border(self: Rc<Self>) -> Option<Rc<dyn OutlinedBorder>>
fn into_outlined_border(self: Rc<Self>) -> Option<Rc<dyn OutlinedBorder>>
OutlinedBorder downcast of the shared border, for Dart’s as OutlinedBorder
(ShapeBorderRef::as_outlined_border_ref). An OutlinedBorder answers Some(self),
as it answers as_outlined_border.Source§fn as_box_border(&self) -> Option<&(dyn BoxBorder + 'static)>
fn as_box_border(&self) -> Option<&(dyn BoxBorder + 'static)>
BoxBorder downcast for BoxBorderRef::lerp.Source§fn into_box_border(self: Rc<Self>) -> Option<Rc<dyn BoxBorder>>
fn into_box_border(self: Rc<Self>) -> Option<Rc<dyn BoxBorder>>
BoxBorder downcast of the shared border
(ShapeBorderRef::as_box_border_ref). A box border answers Some(self), as it
answers as_box_border.Source§impl WidgetStateProperty<InputBorderRef> for MaterialStateUnderlineInputBorder
Returns a InputBorder that’s to be used when a Material component is in the
specified state.
impl WidgetStateProperty<InputBorderRef> for MaterialStateUnderlineInputBorder
Returns a InputBorder that’s to be used when a Material component is in the
specified state.
Source§fn resolve(&self, states: &WidgetStates) -> InputBorderRef
fn resolve(&self, states: &WidgetStates) -> InputBorderRef
Source§fn eq_property(&self, other: &dyn WidgetStateProperty<InputBorderRef>) -> bool
fn eq_property(&self, other: &dyn WidgetStateProperty<InputBorderRef>) -> bool
==. Identity unless a class overrides it, as WidgetStatePropertyAll and
WidgetStateMapper do.Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
WidgetStateProperty.debugFillProperties, from Diagnosticable: a property
adds its own fields.Source§fn as_mapper(&self) -> Option<&WidgetStateMapper<T>>
fn as_mapper(&self) -> Option<&WidgetStateMapper<T>>
other is WidgetStateMapper<T>: the mapper this property is, if it is one,
as the private mapper subclasses of WidgetStateColor and the rest are.