FileLoader.fromUrl constructor

FileLoader.fromUrl(
  1. String url, {
  2. required Factory riveFactory,
})

A class that loads a Rive file from an asset, URL, or file.

To be used with RiveWidgetBuilder.

  • The riveFactory parameter is the Rive factory to use to decode the Rive file, and determines the desired renderer to use.

This class caches the loaded file, and returns the same file instance for subsequent calls to file.

  • The url parameter is the URL to load the Rive file from.

Implementation

FileLoader.fromUrl(String url, {required this.riveFactory})
    : _url = url,
      _providedFile = null,
      _asset = null;