pub struct SplitButtonLeadingButton {
pub key: Option<KeyRef>,
pub on_pressed: Option<Listener>,
pub variant: SplitButtonVariant,
pub shapes: SplitButtonShapes,
pub content_padding: EdgeInsetsGeometry,
pub child: WidgetRef,
}Expand description
The leading part of a split button: Compose’s SplitButtonDefaults.LeadingButton and its
tonal, outlined and elevated companions.
Fields§
§key: Option<KeyRef>§on_pressed: Option<Listener>The action the part performs; None disables it, as an absent onClick does in Flutter.
variant: SplitButtonVariantThe button style the part takes.
shapes: SplitButtonShapesThe shapes the part morphs between.
content_padding: EdgeInsetsGeometryThe padding between the part’s edge and its content.
child: WidgetRefThe part’s content.
Implementations§
Source§impl SplitButtonLeadingButton
impl SplitButtonLeadingButton
Sourcepub fn new<K>(
on_pressed: Option<Listener>,
child: impl IntoWidget<K>,
) -> SplitButtonLeadingButton
pub fn new<K>( on_pressed: Option<Listener>, child: impl IntoWidget<K>, ) -> SplitButtonLeadingButton
Creates a filled leading part; Compose’s LeadingButton(onClick, content).
Sourcepub fn key(self, key: KeyRef) -> SplitButtonLeadingButton
pub fn key(self, key: KeyRef) -> SplitButtonLeadingButton
Dart key:.
Sourcepub fn variant(self, variant: SplitButtonVariant) -> SplitButtonLeadingButton
pub fn variant(self, variant: SplitButtonVariant) -> SplitButtonLeadingButton
Compose’s TonalLeadingButton, OutlinedLeadingButton and ElevatedLeadingButton.
Sourcepub fn shapes(self, shapes: SplitButtonShapes) -> SplitButtonLeadingButton
pub fn shapes(self, shapes: SplitButtonShapes) -> SplitButtonLeadingButton
Compose’s shapes: argument.
Sourcepub fn content_padding(
self,
content_padding: impl Into<EdgeInsetsGeometry>,
) -> SplitButtonLeadingButton
pub fn content_padding( self, content_padding: impl Into<EdgeInsetsGeometry>, ) -> SplitButtonLeadingButton
Compose’s contentPadding: argument.
Trait Implementations§
Source§impl Debug for SplitButtonLeadingButton
impl Debug for SplitButtonLeadingButton
Source§impl StatelessWidget for SplitButtonLeadingButton
impl StatelessWidget for SplitButtonLeadingButton
Source§fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
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)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Dart’s
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 SplitButtonLeadingButton
impl !Send for SplitButtonLeadingButton
impl !Sync for SplitButtonLeadingButton
impl !UnwindSafe for SplitButtonLeadingButton
impl Forget for SplitButtonLeadingButton
impl Freeze for SplitButtonLeadingButtonwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
NonZero<u32>: Freeze,
*const (): Freeze,
*const RcInner<dyn OutlinedBorder> is !null: Freeze,
PhantomData<RcInner<dyn OutlinedBorder>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for SplitButtonLeadingButton
impl Unpin for SplitButtonLeadingButton
impl UnsafeUnpin for SplitButtonLeadingButtonwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const RcInner<dyn OutlinedBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn OutlinedBorder>>: 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
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<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>
The widget as a tree node, made where this is called: its
creation_location.