Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit e30af94

Browse files
authored
Drop optional new from docs (#94)
- Remove `new` keyword in code samples. - Remove `new` keyword in doc reference to named constructors.
1 parent 724c37f commit e30af94

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 2.4.1-dev
2+
13
## 2.4.0
24

35
* Add `StreamGroup.mergeBroadcast()` utility.

lib/src/async_memoizer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'dart:async';
1919
///
2020
/// ```dart
2121
/// class SomeResource {
22-
/// final _closeMemo = new AsyncMemoizer();
22+
/// final _closeMemo = AsyncMemoizer();
2323
///
2424
/// Future close() => _closeMemo.runOnce(() {
2525
/// // ...

lib/src/null_stream_sink.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ import 'dart:async';
1212
/// been closed.
1313
///
1414
/// This can be used when a sink is needed but no events are actually intended
15-
/// to be added. The [new NullStreamSink.error] constructor can be used to
15+
/// to be added. The [NullStreamSink.error] constructor can be used to
1616
/// represent errors when creating a sink, since [StreamSink.done] exposes sink
1717
/// errors. For example:
1818
///
1919
/// ```dart
2020
/// StreamSink<List<int>> openForWrite(String filename) {
2121
/// try {
22-
/// return new RandomAccessSink(new File(filename).openSync());
22+
/// return RandomAccessSink(File(filename).openSync());
2323
/// } on IOException catch (error, stackTrace) {
24-
/// return new NullStreamSink.error(error, stackTrace);
24+
/// return NullStreamSink.error(error, stackTrace);
2525
/// }
2626
/// }
2727
/// ```

lib/src/stream_group.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'dart:async';
1616
/// be single-subscription. In this case, if [stream] is paused or canceled, all
1717
/// streams in the group will likewise be paused or canceled, respectively.
1818
///
19-
/// If the `StreamGroup` is constructed using [new StreamGroup.broadcast],
19+
/// If the `StreamGroup` is constructed using [StreamGroup.broadcast],
2020
/// [stream] will be a broadcast stream. In this case, the streams in the group
2121
/// will never be paused and single-subscription streams in the group will never
2222
/// be canceled. **Note that single-subscription streams in a broadcast group

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy