RiveAnimation.network constructor

const RiveAnimation.network(
  1. String url,
  2. {String? artboard,
  3. List<String> animations = const [],
  4. List<String> stateMachines = const [],
  5. BoxFit? fit,
  6. Alignment? alignment,
  7. Widget? placeHolder,
  8. bool antialiasing = true,
  9. bool useArtboardSize = false,
  10. Rect? clipRect,
  11. List<RiveAnimationController> controllers = const [],
  12. OnInitCallback? onInit,
  13. Map<String, String>? headers,
  14. RiveHitTestBehavior behavior = RiveHitTestBehavior.opaque,
  15. ObjectGenerator? objectGenerator,
  16. Key? key}
)

Creates a new RiveAnimation from a URL over HTTP

Example:

return RiveAnimation.network('https://cdn.rive.app/animations/vehicles.riv');

Implementation

const RiveAnimation.network(
  String url, {
  this.artboard,
  this.animations = const [],
  this.stateMachines = const [],
  this.fit,
  this.alignment,
  this.placeHolder,
  this.antialiasing = true,
  this.useArtboardSize = false,
  this.clipRect,
  this.controllers = const [],
  this.onInit,
  this.headers,
  this.behavior = RiveHitTestBehavior.opaque,
  this.objectGenerator,
  Key? key,
})  : name = url,
      file = null,
      src = _Source.network,
      super(key: key);