Skip to main content

ProgressIndicatorData

Struct ProgressIndicatorData 

Source
pub struct ProgressIndicatorData {
    pub key: Option<KeyRef>,
    pub value: Option<f64>,
    pub background_color: Option<Color>,
    pub color: Option<Color>,
    pub value_color: Option<AnimationRef<Option<Color>>>,
    pub semantics_label: Option<String>,
    pub semantics_value: Option<String>,
}
Expand description

The fields of Dart’s abstract ProgressIndicator, a base class for Material Design progress indicators, which every indicator carries under the field progress_indicator.

The value argument can either be null for an indeterminate progress indicator, or a non-null value between 0.0 and 1.0 for a determinate progress indicator.

See also:

Fields§

§key: Option<KeyRef>§value: Option<f64>

If non-null, the value of this progress indicator.

A value of 0.0 means no progress and 1.0 means that progress is complete. The value will be clamped to be in the range 0.0-1.0.

If null, this progress indicator is indeterminate, which means the indicator displays a predetermined animation that does not indicate how much actual progress is being made.

§background_color: Option<Color>

The progress indicator’s background color.

It is up to the subclass to implement this in whatever way makes sense for the given use case. See the subclass documentation for details.

§color: Option<Color>

The progress indicator’s color.

This is only used if value_color is null. If color is also null, then the ambient ProgressIndicatorThemeData::color will be used. If that is null then the current theme’s ColorScheme::primary will be used by default.

§value_color: Option<AnimationRef<Option<Color>>>

The progress indicator’s color as an animated value.

If null, the progress indicator is rendered with color. If that is null, then it will use the ambient ProgressIndicatorThemeData::color. If that is also null then it defaults to the current theme’s ColorScheme::primary.

§semantics_label: Option<String>

The SemanticsProperties.label for this progress indicator.

This value indicates the purpose of the progress bar, and will be read out by screen readers to indicate the purpose of this progress indicator.

§semantics_value: Option<String>

The SemanticsProperties.value for this progress indicator.

This will be used in conjunction with the semantics_label by screen reading software to identify the widget, and is primarily intended for use with determinate progress indicators to announce how far along they are.

For determinate progress indicators, this will be defaulted to value expressed as a percentage, i.e. 0.1 will become ‘10%’.

Trait Implementations§

Source§

impl Clone for ProgressIndicatorData

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 ProgressIndicatorData

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ProgressIndicatorData

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for ProgressIndicatorData

§

impl !Send for ProgressIndicatorData

§

impl !Sync for ProgressIndicatorData

§

impl !UnwindSafe for ProgressIndicatorData

§

impl Forget for ProgressIndicatorData

§

impl Freeze for ProgressIndicatorData
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, NonZero<u32>: Freeze, &'static AnimationVTable<Option<Color>>: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for ProgressIndicatorData

§

impl Unpin for ProgressIndicatorData
where Rc<dyn Key>: Unpin, NonZero<u32>: Unpin, &'static AnimationVTable<Option<Color>>: Unpin, Rc<Keep>: Unpin, *const u8 is !null: Unpin,

§

impl UnsafeUnpin for ProgressIndicatorData
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, &'static AnimationVTable<Option<Color>>: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin,

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>