Skip to content

Commit

Permalink
docs: fix Rx.using/UsingStream docs (#752)
Browse files Browse the repository at this point in the history
* docs: fix `Rx.using`/`UsingStream` docs

* Update rx.dart
  • Loading branch information
hoc081098 committed Apr 2, 2024
1 parent 1d8eeb5 commit 8134a51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/src/rx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -965,9 +965,9 @@ abstract class Rx {
/// ### Example
///
/// Rx.using<int, Queue<int>>(
/// () => Queue.of([1, 2, 3]),
/// (r) => Stream.fromIterable(r),
/// (r) => r.clear(),
/// resourceFactory: () => Queue.of([1, 2, 3]),
/// streamFactory: (r) => Stream.fromIterable(r),
/// disposer: (r) => r.clear(),
/// ).listen(print); // prints 1, 2, 3
static Stream<T> using<T, R>({
required FutureOr<R> Function() resourceFactory,
Expand Down
6 changes: 3 additions & 3 deletions lib/src/streams/using.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import 'dart:async';
/// ### Example
///
/// UsingStream<int, Queue<int>>(
/// () => Queue.of([1, 2, 3]),
/// (r) => Stream.fromIterable(r),
/// (r) => r.clear(),
/// resourceFactory: () => Queue.of([1, 2, 3]),
/// streamFactory: (r) => Stream.fromIterable(r),
/// disposer: (r) => r.clear(),
/// ).listen(print); // prints 1, 2, 3
class UsingStream<T, R> extends StreamView<T> {
/// Construct a [UsingStream] that creates a resource object from [resourceFactory],
Expand Down

0 comments on commit 8134a51

Please sign in to comment.