diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index 230fe7dc..8c226d3d 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -163,6 +163,13 @@ impl<'a, Message, Renderer: self::Renderer> TextInput<'a, Message, Renderer> { self.style = style.into(); self } + + /// Returns the current [`State`] of the [`TextInput`]. + /// + /// [`TextInput`]: struct.TextInput.html + pub fn state(&self) -> &State { + self.state + } } impl<'a, Message, Renderer> Widget