$wrapWithRxWrapperIfRx<U> static method

$RxWrapper<U> $wrapWithRxWrapperIfRx<U>(
  1. dynamic maybeRx
)

Implementation

static $RxWrapper<U> $wrapWithRxWrapperIfRx<U>(dynamic maybeRx) {
	if (maybeRx is $RxWrapper<U>) {
		return maybeRx;
	}
	else if (maybeRx is Rx<U>) {
		return $RxWrapper.withRx(maybeRx);
	}
	else {
		throw "\$RxWrapper.\$wrapWithRxWrapperIfRx Expected to get an \$RxWrapper<${U}> or Rx<${U}>, but got something of type: ${maybeRx.runtimeType}";
	}
}