Introduce state method to TextInput

This commit is contained in:
Héctor Ramón Jiménez 2020-07-24 19:20:46 +02:00
parent a165eddd75
commit 55d2c5886f

View File

@ -163,6 +163,13 @@ impl<'a, Message, Renderer: self::Renderer> TextInput<'a, Message, Renderer> {
self.style = style.into(); self.style = style.into();
self self
} }
/// Returns the current [`State`] of the [`TextInput`].
///
/// [`TextInput`]: struct.TextInput.html
pub fn state(&self) -> &State {
self.state
}
} }
impl<'a, Message, Renderer> Widget<Message, Renderer> impl<'a, Message, Renderer> Widget<Message, Renderer>