Skip to main content

RefreshProgressIndicator

Struct RefreshProgressIndicator 

Source
pub struct RefreshProgressIndicator {
    pub circular_progress_indicator: CircularProgressIndicator,
    pub elevation: f64,
    pub indicator_margin: EdgeInsetsGeometry,
    pub indicator_padding: EdgeInsetsGeometry,
}
Expand description

An indicator for the progress of refreshing the contents of a widget.

Typically used for swipe-to-refresh interactions. See RefreshIndicator for a complete implementation of swipe-to-refresh driven by a Scrollable widget.

The indicator arc is displayed with value_color, an animated value. To specify a constant color use: AlwaysStoppedAnimation::new(Some(color)).

See also:

  • RefreshIndicator, which automatically displays a CircularProgressIndicator when the underlying vertical scrollable is overscrolled.

Fields§

§circular_progress_indicator: CircularProgressIndicator

The CircularProgressIndicator this extends.

Its progress_indicator.background_color is the background color of that fills the circle under the refresh indicator. If RefreshIndicator.backgroundColor is null then the ambient ProgressIndicatorThemeData::refresh_background_color will be used. If that is null, then the ambient theme’s ThemeData::canvas_color will be used.

§elevation: f64

The z-coordinate at which to place this material relative to its parent.

§indicator_margin: EdgeInsetsGeometry

The amount of space by which to inset the whole indicator. It accommodates the elevation of the indicator.

§indicator_padding: EdgeInsetsGeometry

The amount of space by which to inset the inner refresh indicator.

Implementations§

Source§

impl RefreshProgressIndicator

Source

pub const DEFAULT_STROKE_WIDTH: f64 = 2.5

Default stroke width.

Source

pub fn new() -> RefreshProgressIndicator

Creates a refresh progress indicator.

Rather than creating a refresh progress indicator directly, consider using a RefreshIndicator together with a Scrollable widget.

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.

Source

pub fn key(self, key: KeyRef) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(key:).

Source

pub fn background_color( self, background_color: Color, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(backgroundColor:).

Source

pub fn color(self, color: Color) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(color:).

Source

pub fn value_color( self, value_color: AnimationRef<Option<Color>>, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(valueColor:).

Source

pub fn semantics_label( self, semantics_label: impl Into<String>, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(semanticsLabel:).

Source

pub fn semantics_value( self, semantics_value: impl Into<String>, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(semanticsValue:).

Source

pub fn value(self, value: f64) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(value:).

Source

pub fn stroke_width(self, stroke_width: f64) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(strokeWidth:).

Source

pub fn stroke_align(self, stroke_align: f64) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(strokeAlign:).

Source

pub fn stroke_cap(self, stroke_cap: StrokeCap) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(strokeCap:).

Source

pub fn elevation(self, elevation: f64) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(elevation:).

Source

pub fn indicator_margin( self, indicator_margin: impl Into<EdgeInsetsGeometry>, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(indicatorMargin:).

Source

pub fn indicator_padding( self, indicator_padding: impl Into<EdgeInsetsGeometry>, ) -> RefreshProgressIndicator

Dart RefreshProgressIndicator(indicatorPadding:).

Trait Implementations§

Source§

impl Debug for RefreshProgressIndicator

Source§

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

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

impl Default for RefreshProgressIndicator

Source§

fn default() -> RefreshProgressIndicator

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

impl ProgressIndicator for RefreshProgressIndicator

Source§

impl StatefulWidget for RefreshProgressIndicator

Source§

type State = RefreshProgressIndicatorState

The state this widget creates.
Source§

fn key(&self) -> Option<&KeyRef>

Source§

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 create_state(&self) -> RefreshProgressIndicatorState

Creates the mutable state for this widget at a given location in the tree. Read more
Source§

fn debug_check_constructor(&self)

Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

Source§

fn type_name(&self) -> &'static str

See Widget::type_name. A stateful form another widget kind becomes (an animated or status transition widget) names the widget it wraps.

Auto Trait Implementations§

§

impl !RefUnwindSafe for RefreshProgressIndicator

§

impl !Send for RefreshProgressIndicator

§

impl !Sync for RefreshProgressIndicator

§

impl !UnwindSafe for RefreshProgressIndicator

§

impl Forget for RefreshProgressIndicator

§

impl Freeze for RefreshProgressIndicator
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, PhantomData<fn() -> AnimationController>: Freeze,

§

impl Move for RefreshProgressIndicator

§

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

§

impl UnsafeUnpin for RefreshProgressIndicator
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, PhantomData<fn() -> AnimationController>: 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> 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<W> IntoWidget<StatefulKind> for W
where W: StatefulWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

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

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>