Skip to content

Commit

Permalink
Update rx_impl.dart
Browse files Browse the repository at this point in the history
`.obs` now supports nullable types again as before
  • Loading branch information
wheeOs authored Sep 12, 2024
1 parent 7fd7a18 commit f7dcc98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/get_rx/src/rx_types/rx_core/rx_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ extension BoolExtension on bool {
RxBool get obs => RxBool(this);
}

extension RxT<T extends Object> on T {
extension RxT<T extends Object?> on T {
/// Returns a `Rx` instance with [this] `T` as initial value.
Rx<T> get obs => Rx<T>(this);
}
Expand All @@ -336,7 +336,7 @@ extension RxT<T extends Object> on T {
/// It's a breaking change, but it is essential to avoid conflicts with
/// the new dart 3 features. T will be inferred by contextual type inference
/// rather than the extension type.
extension RxTnew on Object {
extension RxTnew on Object? {
/// Returns a `Rx` instance with [this] `T` as initial value.
Rx<T> obs<T>() => Rx<T>(this as T);
}

0 comments on commit f7dcc98

Please sign in to comment.