RiveFile.import constructor Null safety

RiveFile.import(
  1. ByteData bytes
)

Imports a Rive file from an array of bytes. Will throw RiveFormatErrorException if data is malformed. Will throw RiveUnsupportedVersionException if the version is not supported.

Implementation

factory RiveFile.import(ByteData bytes) {
  var reader = BinaryReader(bytes);
  return RiveFile._(reader, RuntimeHeader.read(reader));
}