pub struct ReplaceTextIntent {
pub current_text_editing_value: TextEditingValue,
pub replacement_text: String,
pub replacement_range: TextRange,
pub cause: SelectionChangedCause,
}Expand description
An Intent that represents a user interaction that attempts to modify the
current TextEditingValue in an input field.
Fields§
§current_text_editing_value: TextEditingValueThe TextEditingValue that this Intent’s action should perform on.
replacement_text: StringThe text to replace the original text within the replacement_range with.
replacement_range: TextRangeThe range of text in current_text_editing_value that needs to be replaced.
cause: SelectionChangedCauseThe SelectionChangedCause that triggered the intent.
Implementations§
Source§impl ReplaceTextIntent
impl ReplaceTextIntent
Sourcepub fn new(
current_text_editing_value: TextEditingValue,
replacement_text: impl Into<String>,
replacement_range: TextRange,
cause: SelectionChangedCause,
) -> ReplaceTextIntent
pub fn new( current_text_editing_value: TextEditingValue, replacement_text: impl Into<String>, replacement_range: TextRange, cause: SelectionChangedCause, ) -> ReplaceTextIntent
Creates a ReplaceTextIntent.
Trait Implementations§
Source§impl Clone for ReplaceTextIntent
impl Clone for ReplaceTextIntent
Source§impl Debug for ReplaceTextIntent
impl Debug for ReplaceTextIntent
impl Eq for ReplaceTextIntent
Source§impl Intent for ReplaceTextIntent
impl Intent for ReplaceTextIntent
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
The value behind the erased intent, for the downcast an
Action does to recover its
own intent type.Source§fn intent_type(&self) -> TypeId
fn intent_type(&self) -> TypeId
Dart’s
intent.runtimeType: the key an Actions map is looked up with.Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Dart’s
Intent.debugFillProperties, from Diagnosticable: an intent adds its own
fields.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Dart’s
Intent.toStringShort: the type and the identity.Source§fn diagnostics_node(&self, name: Option<String>) -> DiagnosticableNode
fn diagnostics_node(&self, name: Option<String>) -> DiagnosticableNode
Dart’s
Intent.toDiagnosticsNode(name:), from Diagnosticable.Source§fn diagnostic_string(&self) -> String
fn diagnostic_string(&self) -> String
Dart’s
Diagnosticable.toString, which a property holding an intent prints.Source§impl PartialEq for ReplaceTextIntent
impl PartialEq for ReplaceTextIntent
impl StructuralPartialEq for ReplaceTextIntent
Auto Trait Implementations§
impl Forget for ReplaceTextIntent
impl Freeze for ReplaceTextIntent
impl Move for ReplaceTextIntent
impl RefUnwindSafe for ReplaceTextIntent
impl Send for ReplaceTextIntentwhere
RawVecInner: Send,
impl Sync for ReplaceTextIntentwhere
RawVecInner: Sync,
impl Unpin for ReplaceTextIntent
impl UnsafeUnpin for ReplaceTextIntent
impl UnwindSafe for ReplaceTextIntentwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> ActionIntent for Twhere
T: Intent,
impl<T> ActionIntent for Twhere
T: Intent,
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.