Skip to main content

AnimatedModalBarrier

Struct AnimatedModalBarrier 

Source
pub struct AnimatedModalBarrier {
    pub key: Option<KeyRef>,
    pub color: AnimationRef<Option<Color>>,
    pub dismissible: bool,
    pub semantics_label: Option<String>,
    pub barrier_semantics_dismissible: Option<bool>,
    pub on_dismiss: Option<Listener>,
    pub clip_details_notifier: Option<Ref<ValueNotifier<EdgeInsets>>>,
    pub semantics_on_tap_hint: Option<String>,
}
Expand description

A widget that prevents the user from interacting with widgets behind itself, and can be configured with an animated color value.

This widget is similar to ModalBarrier except that it takes an animated color instead of a single color.

See also:

Fields§

§key: Option<KeyRef>§color: AnimationRef<Option<Color>>

If non-None, fill the barrier with this color.

§dismissible: bool

Whether touching the barrier will pop the current route off the Navigator.

§semantics_label: Option<String>

Semantics label used for the barrier if it is dismissible.

§barrier_semantics_dismissible: Option<bool>

Whether the modal barrier semantics are included in the semantics tree.

§on_dismiss: Option<Listener>

Called when the barrier is being dismissed.

§clip_details_notifier: Option<Ref<ValueNotifier<EdgeInsets>>>§semantics_on_tap_hint: Option<String>

Implementations§

Source§

impl AnimatedModalBarrier

Source

pub fn new(color: AnimationRef<Option<Color>>) -> AnimatedModalBarrier

Creates a widget that blocks user interaction; Dart’s optional arguments are the setters.

Dart’s default: dismissible true.

Source

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

Dart AnimatedModalBarrier(key:).

Source

pub fn dismissible(self, dismissible: bool) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(dismissible:).

Source

pub fn semantics_label(self, semantics_label: String) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(semanticsLabel:).

Source

pub fn maybe_semantics_label( self, semantics_label: Option<String>, ) -> AnimatedModalBarrier

semantics_label, for a caller that already holds the Option Dart’s named argument carries.

Source

pub fn barrier_semantics_dismissible( self, barrier_semantics_dismissible: bool, ) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(barrierSemanticsDismissible:).

Source

pub fn on_dismiss(self, on_dismiss: Listener) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(onDismiss:).

Source

pub fn clip_details_notifier( self, clip_details_notifier: Ref<ValueNotifier<EdgeInsets>>, ) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(clipDetailsNotifier:).

Source

pub fn semantics_on_tap_hint( self, semantics_on_tap_hint: String, ) -> AnimatedModalBarrier

Dart AnimatedModalBarrier(semanticsOnTapHint:).

Trait Implementations§

Source§

impl AnimatedWidget for AnimatedModalBarrier

Source§

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

Source§

fn listenable(&self) -> Rc<dyn Listenable>

The Listenable to which this widget is listening. Read more
Source§

fn build(&self, app: &mut App, _context: BuildContext) -> WidgetRef

Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).
Source§

fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)

Dart’s AnimatedWidget.debugFillProperties, which a subclass’s own body calls where Dart writes super.
Source§

impl Debug for AnimatedModalBarrier

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for AnimatedModalBarrier

§

impl !Send for AnimatedModalBarrier

§

impl !Sync for AnimatedModalBarrier

§

impl !UnwindSafe for AnimatedModalBarrier

§

impl Forget for AnimatedModalBarrier

§

impl Freeze for AnimatedModalBarrier
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, *const RcInner<dyn Fn(&mut App)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze, *const (): Freeze, PhantomData<fn() -> ValueNotifier<EdgeInsets>>: Freeze,

§

impl Move for AnimatedModalBarrier

§

impl Unpin for AnimatedModalBarrier
where Rc<dyn Key>: Unpin, NonZero<u32>: Unpin, &'static AnimationVTable<Option<Color>>: Unpin, Rc<Keep>: Unpin, *const u8 is !null: Unpin, Rc<dyn Fn(&mut App)>: Unpin, *const (): Unpin,

§

impl UnsafeUnpin for AnimatedModalBarrier
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, *const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin, *const (): UnsafeUnpin, PhantomData<fn() -> ValueNotifier<EdgeInsets>>: 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<AnimatedKind> for W
where W: AnimatedWidget,

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>