fromAssets static method

Future<SpineComponent> fromAssets({
  1. required String atlasFile,
  2. required String skeletonFile,
  3. AssetBundle? bundle,
  4. BoundsProvider boundsProvider = const SetupPoseBounds(),
  5. Vector2? position,
  6. Vector2? scale,
  7. double angle = 0.0,
  8. Anchor anchor = Anchor.topLeft,
  9. Iterable<Component>? children,
  10. int? priority,
})

Implementation

static Future<SpineComponent> fromAssets({
  required String atlasFile,
  required String skeletonFile,
  AssetBundle? bundle,
  BoundsProvider boundsProvider = const SetupPoseBounds(),
  Vector2? position,
  Vector2? scale,
  double angle = 0.0,
  Anchor anchor = Anchor.topLeft,
  Iterable<Component>? children,
  int? priority,
}) async {
  return SpineComponent(
    await SkeletonDrawable.fromAsset(
      atlasFile,
      skeletonFile,
      bundle: bundle,
    ),
    boundsProvider: boundsProvider,
    position: position,
    scale: scale,
    angle: angle,
    anchor: anchor,
    children: children,
    priority: priority,
  );
}