Struct Builder

Source
pub struct Builder<T> { /* private fields */ }

Implementations§

Source§

impl<T> Builder<T>
where T: Default + Clone,

Source

pub fn build(&self) -> Option<T>

Trait Implementations§

Source§

impl<T> Default for Builder<T>
where T: Default + Clone,

Source§

fn default() -> Builder<T>

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

impl LottieBuilderExt for Builder<Lottie>

Source§

fn asset(&self, name: &str) -> &Self

Creates a widget that displays an LottieComposition obtained from an AssetBundle.

Source§

fn file(&self, file: File) -> &Self

Creates a widget that displays an LottieComposition obtained from a File.

Source§

fn memory(&self, byf: Bytes) -> &Self

Creates a widget that displays an LottieComposition obtained from a Uint8List.

Source§

fn network(&self, url: &str) -> &Self

Creates a widget that displays an LottieComposition obtained from the network.

Source§

fn framerate(&self, framerate: FrameRate) -> &Self

The number of frames per second to render. Use FrameRate.composition to use the original frame rate of the Lottie composition (default) Use FrameRate.max to advance the animation progression at every frame. Read more
Source§

fn animate(&self, animate: bool) -> &Self

If no controller is specified, this value indicate whether or not the Lottie animation should be played automatically (default to true). If there is an animation controller specified, this property has no effect. Read more
Source§

fn repeat(&self, repeat: bool) -> &Self

Specify that the automatic animation should repeat in a loop (default to true). The property has no effect if animate is false or controller is not null.
Source§

fn reverse(&self, reverse: bool) -> &Self

Specify that the automatic animation should repeat in a loop in a “reverse” mode (go from start to end and then continuously from end to start). It default to false. The property has no effect if animate is false, repeat is false or controller is not null.
Source§

fn delegates(&self, delegates: LottieDelegates) -> &Self

A group of callbacks to further customize the lottie animation. Read more
Source§

fn options(&self, options: LottieDelegates) -> &Self

Some options to enable/disable some feature of Lottie Read more
Source§

fn onloaded(&self, f: &str) -> &Self

Source§

fn image_provider_factory(&self, factory: LottieImageProviderFactory) -> &Self

Source§

fn key(&self, key: &str) -> &Self

Source§

fn framebuilder(&self, bundle: LottieFrameBuilder) -> &Self

Source§

fn width(&self, width: f64) -> &Self

If non-null, requires the composition to have this width. Read more
Source§

fn height(&self, height: f64) -> &Self

If non-null, require the composition to have this height. Read more
Source§

fn package(&self, package: &str) -> &Self

Source§

fn add_repaint_boundary(&self, value: bool) -> &Self

Indicate to automatically add a RepaintBoundary widget around the animation. This allows to optimize the app performance by isolating the animation in its own Layer. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for Builder<T>

§

impl<T> !RefUnwindSafe for Builder<T>

§

impl<T> !Send for Builder<T>

§

impl<T> !Sync for Builder<T>

§

impl<T> Unpin for Builder<T>

§

impl<T> UnwindSafe for Builder<T>
where T: RefUnwindSafe,

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<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<Fr, To> IntoColor<To> for Fr
where To: FromColor<Fr>,

Source§

fn into_color(self) -> To

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V