diff --git a/lib/src/rx.dart b/lib/src/rx.dart index eacc5d20..93b89ebd 100644 --- a/lib/src/rx.dart +++ b/lib/src/rx.dart @@ -965,9 +965,9 @@ abstract class Rx { /// ### Example /// /// Rx.using>( - /// () => 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 using({ required FutureOr Function() resourceFactory, diff --git a/lib/src/streams/using.dart b/lib/src/streams/using.dart index 3bc25259..1cbed852 100644 --- a/lib/src/streams/using.dart +++ b/lib/src/streams/using.dart @@ -16,9 +16,9 @@ import 'dart:async'; /// ### Example /// /// UsingStream>( -/// () => 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 extends StreamView { /// Construct a [UsingStream] that creates a resource object from [resourceFactory],