IconController.network constructor

IconController.network(
  1. String url, {
  2. String? state,
  3. int? direction,
})

Creates a IconController instance that loads a Lottie composition from network.

Implementation

IconController.network(String url, {String? state, int? direction}) {
  _controller = null;
  _composition = null;
  _marker = null;
  _state = state;
  _direction = direction ?? 1;

  NetworkProvider(url)
      .load()
      .then((value) => {
            _composition = value,
            notifyListeners(),
          })
      .onError((error, stackTrace) => {});
}