pub struct DefaultTextEditingShortcuts {
pub key: Option<KeyRef>,
pub child: WidgetRef,
}Expand description
A widget with the shortcuts used for the default text editing behavior.
This default behavior can be overridden by placing a Shortcuts widget
lower in the widget tree than this. See the Action trait for an example
of remapping an Intent to a custom Action.
The Shortcuts widget usually takes precedence over system keybindings.
Proceed with caution if the shortcut you wish to override is also used by
the system. For example, overriding LogicalKeyboardKey::BACKSPACE could
cause CJK input methods to discard more text than they should when the
backspace key is pressed during text composition on iOS.
See also:
WidgetsApp, which creates aDefaultTextEditingShortcuts.
Fields§
§key: Option<KeyRef>See Widget::key.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl DefaultTextEditingShortcuts
impl DefaultTextEditingShortcuts
Sourcepub fn new<K>(child: impl IntoWidget<K>) -> DefaultTextEditingShortcuts
pub fn new<K>(child: impl IntoWidget<K>) -> DefaultTextEditingShortcuts
Creates a DefaultTextEditingShortcuts widget that provides the default text editing
shortcuts on the current platform.
Sourcepub fn key(self, key: KeyRef) -> DefaultTextEditingShortcuts
pub fn key(self, key: KeyRef) -> DefaultTextEditingShortcuts
Dart DefaultTextEditingShortcuts(key:).
Trait Implementations§
Source§impl Debug for DefaultTextEditingShortcuts
impl Debug for DefaultTextEditingShortcuts
Source§impl StatelessWidget for DefaultTextEditingShortcuts
impl StatelessWidget for DefaultTextEditingShortcuts
Source§fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for DefaultTextEditingShortcuts
impl !Send for DefaultTextEditingShortcuts
impl !Sync for DefaultTextEditingShortcuts
impl !UnwindSafe for DefaultTextEditingShortcuts
impl Forget for DefaultTextEditingShortcuts
impl Freeze for DefaultTextEditingShortcuts
impl Move for DefaultTextEditingShortcuts
impl Unpin for DefaultTextEditingShortcuts
impl UnsafeUnpin for DefaultTextEditingShortcutswhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
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<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.