Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 0ee733f

Browse files
committed
Bring over latest files from flutter/packages
1 parent 9cf7663 commit 0ee733f

File tree

119 files changed

+4298
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+4298
-69
lines changed

CHANGELOG.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,107 @@
1-
### 3.1.0
1+
## NEXT
2+
3+
* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
4+
* Transfers the package source from https://github.com/flutter/packages
5+
to https://github.com/dart-lang/platform.
6+
7+
## 3.1.4
8+
9+
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
10+
* Fixes new lint warnings.
11+
12+
## 3.1.3
13+
14+
* Adds example app.
15+
16+
## 3.1.2
17+
18+
* Adds pub topics to package metadata.
19+
* Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
20+
21+
## 3.1.1
22+
23+
* Transfers the package source from https://github.com/google/platform.dart to
24+
https://github.com/flutter/packages.
25+
26+
## 3.1.0
227

328
* Removed `Platform.packageRoot`, which was already marked deprecated, and which
429
didn't work in Dart 2.
530

6-
### 3.0.2
31+
## 3.0.2
732

833
* Added `FakePlatform.copyWith` function.
934

10-
### 3.0.1
35+
## 3.0.1
1136

1237
* Added string constants for each of the supported platforms for use in switch
1338
statements.
1439

15-
### 3.0.0
40+
## 3.0.0
1641

1742
* First stable null safe release.
1843

19-
### 3.0.0-nullsafety.4
44+
## 3.0.0-nullsafety.4
2045

2146
* Update supported SDK range.
2247

23-
### 3.0.0-nullsafety.3
48+
## 3.0.0-nullsafety.3
2449

2550
* Update supported SDK range.
2651

27-
### 3.0.0-nullsafety.2
52+
## 3.0.0-nullsafety.2
2853

2954
* Update supported SDK range.
3055

31-
### 3.0.0-nullsafety.1
56+
## 3.0.0-nullsafety.1
3257

3358
* Migrate package to null-safe dart.
3459

35-
### 2.2.1
60+
## 2.2.1
3661

3762
* Add `operatingSystemVersion`
3863

39-
### 2.2.0
64+
## 2.2.0
4065

4166
* Declare compatibility with Dart 2 stable
4267
* Update dependency on `package:test` to 1.0
4368

44-
### 2.1.2
69+
## 2.1.2
4570

4671
* Relax sdk upper bound constraint to '<2.0.0' to allow 'edge' dart sdk use.
4772

48-
### 2.1.1
73+
## 2.1.1
4974

5075
* Bumped maximum Dart SDK version to 2.0.0-dev.infinity
5176

52-
### 2.1.0
77+
## 2.1.0
5378

5479
* Added `localeName`
5580
* Bumped minimum Dart SDK version to 1.24.0-dev.0.0
5681

57-
### 2.0.0
82+
## 2.0.0
5883

5984
* Added `stdinSupportsAnsi` and `stdinSupportsAnsi`
6085
* Removed `ansiSupported`
6186

62-
### 1.1.1
87+
## 1.1.1
6388

6489
* Updated `LocalPlatform` to use new `dart.io` API for ansi color support queries
6590
* Bumped minimum Dart SDK version to 1.23.0-dev.10.0
6691

67-
### 1.1.0
92+
## 1.1.0
6893

6994
* Added `ansiSupported`
7095
* Bumped minimum Dart SDK version to 1.23.0-dev.9.0
7196

72-
#### 1.0.2
97+
## 1.0.2
7398

7499
* Minor doc updates
75100

76-
#### 1.0.1
101+
## 1.0.1
77102

78103
* Added const constructors for `Platform` and `LocalPlatform`
79104

80-
#### 1.0.0
105+
## 1.0.0
81106

82107
* Initial version

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
[![Pub](https://img.shields.io/pub/v/platform.svg)](https://pub.dartlang.org/packages/platform)
22

3-
## Moved
4-
5-
The source for the `platform` package has moved to [the `flutter/packages`
6-
repository](https://github.com/flutter/packages/tree/main/packages/platform).
7-
8-
-----
9-
103
A generic platform abstraction for Dart.
114

125
Like `dart:io`, `package:platform` supplies a rich, Dart-idiomatic API for

example/.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

example/.metadata

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "efbf63d9c66b9f6ec30e9ad4611189aa80003d31"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
17+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
18+
- platform: android
19+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
20+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
21+
- platform: ios
22+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
23+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
24+
- platform: linux
25+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
26+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
27+
- platform: macos
28+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
29+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
30+
- platform: windows
31+
create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
32+
base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
33+
34+
# User provided section
35+
36+
# List of Local paths (relative to this file) that should be
37+
# ignored by the migrate tool.
38+
#
39+
# Files that are not part of the templates will be ignored by default.
40+
unmanaged_files:
41+
- 'lib/main.dart'
42+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "dev.flutter.plaform_example"
27+
compileSdk flutter.compileSdkVersion
28+
ndkVersion flutter.ndkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
}
42+
43+
defaultConfig {
44+
applicationId "dev.flutter.plaform_example"
45+
minSdkVersion flutter.minSdkVersion
46+
targetSdkVersion flutter.targetSdkVersion
47+
versionCode flutterVersionCode.toInteger()
48+
versionName flutterVersionName
49+
}
50+
51+
buildTypes {
52+
release {
53+
signingConfig signingConfigs.debug
54+
}
55+
}
56+
}
57+
58+
flutter {
59+
source '../..'
60+
}
61+
62+
dependencies {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="plaform_example"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:theme="@style/LaunchTheme"
11+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12+
android:hardwareAccelerated="true"
13+
android:windowSoftInputMode="adjustResize">
14+
<!-- Specifies an Android theme to apply to this Activity as soon as
15+
the Android process has started. This theme is visible to the user
16+
while the Flutter UI initializes. After that, this theme continues
17+
to determine the Window background behind the Flutter UI. -->
18+
<meta-data
19+
android:name="io.flutter.embedding.android.NormalTheme"
20+
android:resource="@style/NormalTheme"
21+
/>
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN"/>
24+
<category android:name="android.intent.category.LAUNCHER"/>
25+
</intent-filter>
26+
</activity>
27+
<!-- Don't delete the meta-data below.
28+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
29+
<meta-data
30+
android:name="flutterEmbedding"
31+
android:value="2" />
32+
</application>
33+
</manifest>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
package dev.flutter.plaform_example
6+
7+
import io.flutter.embedding.android.FlutterActivity
8+
9+
class MainActivity : FlutterActivity() {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="?android:colorBackground" />
4+
</layer-list>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@android:color/white" />
4+
</layer-list>
Loading
Loading
Loading
Loading
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
the Flutter engine draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>

0 commit comments

Comments
 (0)