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

Commit

Permalink
Simplify default constructor for OperatingSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
mraleph committed Jun 12, 2024
1 parent f6aa005 commit 7004403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/os_override.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ final class OperatingSystem {
@visibleForTesting
@pragma('vm:prefer-inline')
@pragma('dart2js:prefer-inline')
OperatingSystem(String id, String Function() computeVersion)
OperatingSystem(String id, String computeVersion)
: this._(
id == linuxId
? const LinuxOS()
Expand All @@ -112,7 +112,7 @@ final class OperatingSystem {
: id == browserId
? const BrowserOS()
: UnknownOS(id),
computeVersion);
() => computeVersion);

/// Used by platforms which know the ID object.
const OperatingSystem._(this._osId, this._computeVersion);
Expand Down

0 comments on commit 7004403

Please sign in to comment.