pub struct TextAlignVertical {
pub y: f64,
}Expand description
The vertical alignment of text within an input box.
A single y value that can range from -1.0 to 1.0.
-1.0 aligns to the top of an input box so that the top of the first line of
text fits within the box and its padding. 0.0 aligns to the center of the
box. 1.0 aligns so that the bottom of the last line of text aligns with the
bottom interior edge of the input box.
See also:
TextField.textAlignVertical, which is passed on to theInputDecorator.CupertinoTextField.textAlignVertical, which behaves in the same way as the parameter in TextField.InputDecorator.textAlignVertical, which defines the alignment of prefix, input, and suffix within anInputDecorator.
Fields§
§y: f64A value ranging from -1.0 to 1.0 that defines the topmost and bottommost locations of the top and bottom of the input box.
Implementations§
Source§impl TextAlignVertical
impl TextAlignVertical
Sourcepub const TOP: TextAlignVertical
pub const TOP: TextAlignVertical
Aligns a TextField’s input Text with the topmost location within a TextField’s input box.
Sourcepub const CENTER: TextAlignVertical
pub const CENTER: TextAlignVertical
Aligns a TextField’s input Text to the center of the TextField.
Sourcepub const BOTTOM: TextAlignVertical
pub const BOTTOM: TextAlignVertical
Aligns a TextField’s input Text with the bottommost location within a TextField.
Sourcepub fn new(y: f64) -> TextAlignVertical
pub fn new(y: f64) -> TextAlignVertical
Creates a TextAlignVertical from any y value between -1.0 and 1.0.
Trait Implementations§
Source§impl Clone for TextAlignVertical
impl Clone for TextAlignVertical
Source§fn clone(&self) -> TextAlignVertical
fn clone(&self) -> TextAlignVertical
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more