fromFile static method

Future<SkeletonData> fromFile(
  1. Atlas atlas,
  2. String skeletonFile
)

Implementation

static Future<SkeletonData> fromFile(Atlas atlas, String skeletonFile) async {
  if (skeletonFile.endsWith(".json")) {
    return fromJson(atlas, convert.utf8.decode(await File(skeletonFile).readAsBytes()));
  } else {
    return fromBinary(atlas, await File(skeletonFile).readAsBytes());
  }
}