setTheme method

bool setTheme(
  1. String themeId
)

Implementation

bool setTheme(String themeId) {
  if (dotLottiePlayer != null && !isDisposed) {
    try {
      final player = dotLottiePlayer as JSObject;
      final method = player['setTheme'.toJS] as JSFunction;
      final result = method.callAsFunction(player, themeId.toJS);
      return (result as JSBoolean?)?.toDart ?? false;
    } catch (e) {
      return false;
    }
  }
  return false;
}