pub enum FloatingCursorDragState {
Start,
Update,
End,
}Expand description
The state of a “floating cursor” drag on an iOS soft keyboard.
The “floating cursor” cursor-positioning mode is an iOS feature used to precisely position the caret in some editable text using certain touch gestures. As an example, when the user long-presses the spacebar on the iOS virtual keyboard, iOS enters floating cursor mode where the whole keyboard becomes a trackpad. In this mode, there are two visible cursors. One, the floating cursor, hovers over the text, following the user’s horizontal movements exactly and snapping to lines vertically. The other, the placeholder cursor, is a “shadow” that also snaps to the actual location where the cursor will go horizontally when the user releases the trackpad.
The floating cursor renders over the text field, while the placeholder cursor is a faint shadow of the cursor rendered in the text field in the location between characters where the cursor will drop into when released. The placeholder cursor is a faint vertical bar, while the floating cursor has the same appearance as a normal cursor (a blue vertical bar).
This feature works out-of-the-box with Flutter. Support is built into
EditableText.
See also:
EditableText.backgroundCursorColor, which configures the color of the placeholder cursor while the floating cursor is being dragged.
Variants§
Start
A user has just activated a floating cursor by long pressing on the spacebar.
Update
A user is dragging a floating cursor.
End
A user has lifted their finger off the screen after using a floating cursor.
Trait Implementations§
Source§impl Clone for FloatingCursorDragState
impl Clone for FloatingCursorDragState
Source§fn clone(&self) -> FloatingCursorDragState
fn clone(&self) -> FloatingCursorDragState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FloatingCursorDragState
Source§impl Debug for FloatingCursorDragState
impl Debug for FloatingCursorDragState
impl Eq for FloatingCursorDragState
Source§impl Hash for FloatingCursorDragState
impl Hash for FloatingCursorDragState
Source§impl PartialEq for FloatingCursorDragState
impl PartialEq for FloatingCursorDragState
impl StructuralPartialEq for FloatingCursorDragState
Auto Trait Implementations§
impl Freeze for FloatingCursorDragState
impl RefUnwindSafe for FloatingCursorDragState
impl Send for FloatingCursorDragState
impl Sync for FloatingCursorDragState
impl Unpin for FloatingCursorDragState
impl UnsafeUnpin for FloatingCursorDragState
impl UnwindSafe for FloatingCursorDragState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.