fromAssets static method
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,
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,
);
}