This repository was archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Bring over latest files from flutter/packages #46
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,107 @@ | ||
### 3.1.0 | ||
## NEXT | ||
|
||
* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2. | ||
* Transfers the package source from https://github.com/flutter/packages | ||
to https://github.com/dart-lang/platform. | ||
|
||
## 3.1.4 | ||
|
||
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0. | ||
* Fixes new lint warnings. | ||
|
||
## 3.1.3 | ||
|
||
* Adds example app. | ||
|
||
## 3.1.2 | ||
|
||
* Adds pub topics to package metadata. | ||
* Updates minimum supported SDK version to Flutter 3.7/Dart 2.19. | ||
|
||
## 3.1.1 | ||
|
||
* Transfers the package source from https://github.com/google/platform.dart to | ||
https://github.com/flutter/packages. | ||
|
||
## 3.1.0 | ||
|
||
* Removed `Platform.packageRoot`, which was already marked deprecated, and which | ||
didn't work in Dart 2. | ||
|
||
### 3.0.2 | ||
## 3.0.2 | ||
|
||
* Added `FakePlatform.copyWith` function. | ||
|
||
### 3.0.1 | ||
## 3.0.1 | ||
|
||
* Added string constants for each of the supported platforms for use in switch | ||
statements. | ||
|
||
### 3.0.0 | ||
## 3.0.0 | ||
|
||
* First stable null safe release. | ||
|
||
### 3.0.0-nullsafety.4 | ||
## 3.0.0-nullsafety.4 | ||
|
||
* Update supported SDK range. | ||
|
||
### 3.0.0-nullsafety.3 | ||
## 3.0.0-nullsafety.3 | ||
|
||
* Update supported SDK range. | ||
|
||
### 3.0.0-nullsafety.2 | ||
## 3.0.0-nullsafety.2 | ||
|
||
* Update supported SDK range. | ||
|
||
### 3.0.0-nullsafety.1 | ||
## 3.0.0-nullsafety.1 | ||
|
||
* Migrate package to null-safe dart. | ||
|
||
### 2.2.1 | ||
## 2.2.1 | ||
|
||
* Add `operatingSystemVersion` | ||
|
||
### 2.2.0 | ||
## 2.2.0 | ||
|
||
* Declare compatibility with Dart 2 stable | ||
* Update dependency on `package:test` to 1.0 | ||
|
||
### 2.1.2 | ||
## 2.1.2 | ||
|
||
* Relax sdk upper bound constraint to '<2.0.0' to allow 'edge' dart sdk use. | ||
|
||
### 2.1.1 | ||
## 2.1.1 | ||
|
||
* Bumped maximum Dart SDK version to 2.0.0-dev.infinity | ||
|
||
### 2.1.0 | ||
## 2.1.0 | ||
|
||
* Added `localeName` | ||
* Bumped minimum Dart SDK version to 1.24.0-dev.0.0 | ||
|
||
### 2.0.0 | ||
## 2.0.0 | ||
|
||
* Added `stdinSupportsAnsi` and `stdinSupportsAnsi` | ||
* Removed `ansiSupported` | ||
|
||
### 1.1.1 | ||
## 1.1.1 | ||
|
||
* Updated `LocalPlatform` to use new `dart.io` API for ansi color support queries | ||
* Bumped minimum Dart SDK version to 1.23.0-dev.10.0 | ||
|
||
### 1.1.0 | ||
## 1.1.0 | ||
|
||
* Added `ansiSupported` | ||
* Bumped minimum Dart SDK version to 1.23.0-dev.9.0 | ||
|
||
#### 1.0.2 | ||
## 1.0.2 | ||
|
||
* Minor doc updates | ||
|
||
#### 1.0.1 | ||
## 1.0.1 | ||
|
||
* Added const constructors for `Platform` and `LocalPlatform` | ||
|
||
#### 1.0.0 | ||
## 1.0.0 | ||
|
||
* Initial version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://dart.dev/guides/libraries/private-files | ||
# Created by `dart pub` | ||
.dart_tool/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
A small example application demonstrating how to use the platform information | ||
APIs in `package:platform`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file configures the static analysis results for your project (errors, | ||
# warnings, and lints). | ||
# | ||
# This enables the 'recommended' set of lints from `package:lints`. | ||
# This set helps identify many issues that may lead to problems when running | ||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic | ||
# style and format. | ||
# | ||
# If you want a smaller set of lints you can change this to specify | ||
# 'package:lints/core.yaml'. These are just the most critical lints | ||
# (the recommended set includes the core lints). | ||
# The core lints are also what is used by pub.dev for scoring packages. | ||
|
||
include: package:lints/recommended.yaml | ||
|
||
# Uncomment the following section to specify additional rules. | ||
|
||
# linter: | ||
# rules: | ||
# - camel_case_types | ||
|
||
# analyzer: | ||
# exclude: | ||
# - path/to/excluded/files/** | ||
|
||
# For more information about the core and recommended set of lints, see | ||
# https://dart.dev/go/core-lints | ||
|
||
# For additional information about configuring this file, see | ||
# https://dart.dev/guides/language/analysis-options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:platform/platform.dart'; | ||
|
||
void main(List<String> arguments) { | ||
const LocalPlatform platform = LocalPlatform(); | ||
|
||
print('Operating System: ${platform.operatingSystem}.'); | ||
print('Local Hostname: ${platform.localHostname}.'); | ||
print('Number of Processors: ${platform.numberOfProcessors}.'); | ||
print('Path Separator: ${platform.pathSeparator}.'); | ||
print('Locale Name: ${platform.localeName}.'); | ||
print('Stdin Supports ANSI: ${platform.stdinSupportsAnsi}.'); | ||
print('Stdout Supports ANSI: ${platform.stdoutSupportsAnsi}.'); | ||
print('Executable Arguments: ${platform.executableArguments}.'); | ||
print('Dart Version: ${platform.version}.'); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: example | ||
description: Demonstrates how to use the platform api. | ||
version: 1.0.0 | ||
publish_to: none | ||
|
||
environment: | ||
sdk: ^3.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably use 3.2 like the package itself. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
dependencies: | ||
platform: | ||
path: ../ | ||
|
||
dev_dependencies: | ||
lints: ^4.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/// Core interfaces & classes. | ||
// Core interfaces & classes. | ||
export 'src/interface/local_platform.dart'; | ||
export 'src/interface/platform.dart'; | ||
export 'src/testing/fake_platform.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
name: platform | ||
version: 3.1.0 | ||
description: A pluggable, mockable platform abstraction for Dart. | ||
homepage: https://github.com/google/platform.dart | ||
description: A pluggable, mockable platform information abstraction for Dart. | ||
repository: https://github.com/dart-lang/platform | ||
issue_tracker: https://github.com/dart-lang/platform/issues | ||
version: 3.1.4 | ||
|
||
environment: | ||
sdk: ">=2.12.0 <3.0.0" | ||
sdk: ^3.2.0 | ||
|
||
dev_dependencies: | ||
lints: ^1.0.1 | ||
lints: ^4.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
test: ^1.16.8 | ||
|
||
topics: | ||
- information | ||
- platform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with
dart-lang
-owned package conventions; is it normal to have a custom analysis options for the example directory?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, but I'd expect examples to use
lints/recommended
, to be written for users using those lints, and the package itself to usedart_flutter_team_lints
(or whatever it's called, I can never remember, or seem to find it when I need it).Could probably use the same lints everywhere, since the dart/flutter team lints includes everything in recommended, and probably won't add many extra restrictions for traditional example code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't strictly needed before, but now example and package use different lints, so now it's needed