Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.2.3

* Include lineTerminator from Dart 3.1.0 on platform

# 2.2.2
* Improve dependency constraints.

Expand Down
11 changes: 11 additions & 0 deletions lib/src/platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,15 @@ class Platform {
/// possibly followed by whitespace and other version and
/// build details.
static String get version => '';

/// The current operating system's default line terminator.
///
/// The default character sequence that the operating system
/// uses to separate or terminate text lines.
///
/// The line terminator is currently the single line-feed character,
/// U+000A or `"\n"`, on all supported operating systems except Windows,
/// which uses the carriage-return + line-feed sequence, U+000D U+000A or
/// `"\r\n"`
static String get lineTerminator => isWindows ? '\r\n' : '\n';
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: universal_io
version: 2.2.2
version: 2.2.3
description: Cross-platform 'dart:io' that adds browser support for HttpClient and some other
"dart:io" APIs.
homepage: https://github.com/dart-io-packages/universal_io
Expand Down