Skip to main content

Step

Struct Step 

Source
pub struct Step {
    pub title: WidgetRef,
    pub subtitle: Option<WidgetRef>,
    pub content: WidgetRef,
    pub state: StepState,
    pub is_active: bool,
    pub label: Option<WidgetRef>,
    pub step_style: Option<StepStyle>,
}
Expand description

A material step used in Stepper. The step can have a title and subtitle, an icon within its circle, some content and a state that governs its styling.

Fields§

§title: WidgetRef

The title of the step that typically describes it.

§subtitle: Option<WidgetRef>

The subtitle of the step that appears below the title.

§content: WidgetRef

The content of the step that appears below the title and subtitle.

§state: StepState

The state of the step which determines the styling of its components and whether steps are interactive.

§is_active: bool

Whether or not the step is active. The flag only influences styling.

§label: Option<WidgetRef>

Only for StepperType::Horizontal, an optional widget that appears under the title.

§step_style: Option<StepStyle>

Optional overrides for the step’s default visual configuration.

Implementations§

Source§

impl Step

Source

pub fn new<T, C>(title: impl IntoWidget<T>, content: impl IntoWidget<C>) -> Step

Creates a step for a Stepper; Dart’s optional named arguments are the setters.

Source

pub fn subtitle<K>(self, subtitle: impl IntoWidget<K>) -> Step

Dart Step(subtitle:).

Source

pub fn state(self, state: StepState) -> Step

Dart Step(state:).

Source

pub fn is_active(self, is_active: bool) -> Step

Dart Step(isActive:).

Source

pub fn label<K>(self, label: impl IntoWidget<K>) -> Step

Dart Step(label:).

Source

pub fn step_style(self, step_style: StepStyle) -> Step

Dart Step(stepStyle:).

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Step

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Step

§

impl !Send for Step

§

impl !Sync for Step

§

impl !UnwindSafe for Step

§

impl Forget for Step

§

impl Freeze for Step
where *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, *const RcInner<dyn BoxBorder> is !null: Freeze, PhantomData<RcInner<dyn BoxBorder>>: Freeze, *const RcInner<dyn Gradient> is !null: Freeze, PhantomData<RcInner<dyn Gradient>>: Freeze, &'static dyn ColorExtension: Freeze, *const RcInner<dyn ColorExtension> is !null: Freeze, PhantomData<RcInner<dyn ColorExtension>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<String>: Freeze, *const RcInner<Paint> is !null: Freeze, PhantomData<RcInner<Paint>>: Freeze, PhantomData<Shadow>: Freeze, PhantomData<FontFeature>: Freeze, PhantomData<FontVariation>: Freeze,

§

impl Move for Step

§

impl Unpin for Step
where Rc<dyn Widget>: Unpin, Rc<dyn BoxBorder>: Unpin, Rc<dyn Gradient>: Unpin, &'static dyn ColorExtension: Unpin, Rc<dyn ColorExtension>: Unpin, *const u8 is !null: Unpin, Rc<Paint>: Unpin,

§

impl UnsafeUnpin for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>