setImageSlot method
Implementation
Future<bool> setImageSlot(String slotId, String src) async {
if (dotLottiePlayer != null && !isDisposed) {
try {
final player = dotLottiePlayer as JSObject;
final method = player['setImageSlot'.toJS] as JSFunction;
final promise = method.callAsFunction(player, slotId.toJS, src.toJS);
final result = await (promise as JSPromise<JSAny?>).toDart;
return (result as JSBoolean?)?.toDart ?? false;
} catch (e) {
return false;
}
}
return false;
}