loadFromFile static method

Future<AnimatedVectorData> loadFromFile(
  1. String path
)

Dynamically load an AnimatedVectorData from a json Shape Shifter file inside the file system.

The returned instance needs to be stored somewhere in order to be used as this method doesn't store anything inside a cache or similar.

This method will throw UnsupportedError when called on the web platform.s

Where possible prefer to use code generation from animated_vector_gen as it's syncronous and allows for const instances to be created.

Implementation

static Future<AnimatedVectorData> loadFromFile(String path) async {
  return loadDataFromFile(path);
}