fromBytes static method

Future<LottieComposition> fromBytes(
  1. List<int> bytes, {
  2. LottieDecoder? decoder,
})

Implementation

static Future<LottieComposition> fromBytes(
  List<int> bytes, {
  LottieDecoder? decoder,
}) async {
  decoder ??= decodeZip;

  var compositionFuture = await decoder(bytes);
  if (compositionFuture != null) {
    return compositionFuture;
  }
  return parseJsonBytes(bytes);
}