readOnly<T> method

  1. @protected
ReadOnlyRx<T> readOnly<T>(
  1. SwiftValue<T> swift
)

Create a read-only wrapper for a SwiftValue This is a convenience method that also registers it for disposal

Implementation

@protected
ReadOnlyRx<T> readOnly<T>(SwiftValue<T> swift) {
  final readOnly = ReadOnlyRx(swift);
  registerReadOnlyRx(readOnly);
  return readOnly;
}