Trait components::lottie::LottieBuilderExt[][src]

pub trait LottieBuilderExt {
Show methods pub fn asset(&self, name: &str) -> &Self;
pub fn file(&self, file: File) -> &Self;
pub fn memory(&self, byf: Bytes) -> &Self;
pub fn network(&self, url: &str) -> &Self;
pub fn framerate(&self, framerate: FrameRate) -> &Self;
pub fn animate(&self, animate: bool) -> &Self;
pub fn repeat(&self, repeat: bool) -> &Self;
pub fn reverse(&self, reverse: bool) -> &Self;
pub fn delegates(&self, delegates: LottieDelegates) -> &Self;
pub fn options(&self, options: LottieDelegates) -> &Self;
pub fn onloaded(&self, f: &str) -> &Self;
pub fn image_provider_factory(
        &self,
        factory: LottieImageProviderFactory
    ) -> &Self;
pub fn key(&self, key: &str) -> &Self;
pub fn framebuilder(&self, bundle: LottieFrameBuilder) -> &Self;
pub fn width(&self, width: f64) -> &Self;
pub fn height(&self, height: f64) -> &Self;
pub fn package(&self, package: &str) -> &Self;
pub fn add_repaint_boundary(&self, value: bool) -> &Self;
}

Required methods

pub fn asset(&self, name: &str) -> &Self[src]

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

pub fn file(&self, file: File) -> &Self[src]

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

pub fn memory(&self, byf: Bytes) -> &Self[src]

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

pub fn network(&self, url: &str) -> &Self[src]

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

pub fn framerate(&self, framerate: FrameRate) -> &Self[src]

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.

The advantage of using a low frame rate is to preserve the device battery by doing less rendering work.

pub fn animate(&self, animate: bool) -> &Self[src]

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.

See [repeat] to control whether the animation should repeat.

pub fn repeat(&self, repeat: bool) -> &Self[src]

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.

pub fn reverse(&self, reverse: bool) -> &Self[src]

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.

pub fn delegates(&self, delegates: LottieDelegates) -> &Self[src]

A group of callbacks to further customize the lottie animation.

  • A text delegate to dynamically change some text displayed in the animation
  • A value callback to change the properties of the animation at runtime.
  • A text style factory to map between a font family specified in the animation and the font family in your assets.

pub fn options(&self, options: LottieDelegates) -> &Self[src]

Some options to enable/disable some feature of Lottie

  • enableMergePaths: Enable merge path support

pub fn onloaded(&self, f: &str) -> &Self[src]

pub fn image_provider_factory(
    &self,
    factory: LottieImageProviderFactory
) -> &Self
[src]

pub fn key(&self, key: &str) -> &Self[src]

pub fn framebuilder(&self, bundle: LottieFrameBuilder) -> &Self[src]

pub fn width(&self, width: f64) -> &Self[src]

If non-null, requires the composition to have this width.

If null, the composition will pick a size that best preserves its intrinsic aspect ratio.

pub fn height(&self, height: f64) -> &Self[src]

If non-null, require the composition to have this height.

If null, the composition will pick a size that best preserves its intrinsic aspect ratio.

pub fn package(&self, package: &str) -> &Self[src]

pub fn add_repaint_boundary(&self, value: bool) -> &Self[src]

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.

This property is true by default.

Loading content...

Implementors

impl LottieBuilderExt for Builder<Lottie>[src]

pub fn asset(&self, name: &str) -> &Builder<Lottie>[src]

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

pub fn file(&self, file: File) -> &Builder<Lottie>[src]

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

pub fn memory(&self, byf: Bytes) -> &Builder<Lottie>[src]

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

pub fn network(&self, url: &str) -> &Builder<Lottie>[src]

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

Loading content...