Skip to content

Commit 4b269c1

Browse files
author
JsonYe
committed
Adapter Flutter 3.1
1 parent 6748b05 commit 4b269c1

File tree

115 files changed

+2306
-401
lines changed

Some content is hidden

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

115 files changed

+2306
-401
lines changed

.gitignore

+4-47
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
*.log
44
*.pyc
55
*.swp
6-
pubspec.lock
76
.DS_Store
87
.atom/
98
.buildlog/
109
.history
1110
.svn/
11+
migrate_working_dir/
1212

1313
# IntelliJ related
1414
*.iml
@@ -22,56 +22,13 @@ pubspec.lock
2222
#.vscode/
2323

2424
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
2527
**/doc/api/
2628
.dart_tool/
27-
.flutter-plugins
2829
.packages
29-
.pub-cache/
30-
.pub/
31-
/build/
32-
33-
# Android related
34-
**/android/**/gradle-wrapper.jar
35-
**/android/.gradle
36-
**/android/captures/
37-
**/android/gradlew
38-
**/android/gradlew.bat
39-
**/android/local.properties
40-
**/android/**/GeneratedPluginRegistrant.java
41-
42-
# iOS/XCode related
43-
**/ios/**/*.mode1v3
44-
**/ios/**/*.mode2v3
45-
**/ios/**/*.moved-aside
46-
**/ios/**/*.pbxuser
47-
**/ios/**/*.perspectivev3
48-
**/ios/**/*sync/
49-
**/ios/**/.sconsign.dblite
50-
**/ios/**/.tags*
51-
**/ios/**/.vagrant/
52-
**/ios/**/DerivedData/
53-
**/ios/**/Icon?
54-
**/ios/**/Pods/
55-
**/ios/**/.symlinks/
56-
**/ios/**/profile
57-
**/ios/**/xcuserdata
58-
**/ios/.generated/
59-
**/ios/Flutter/App.framework
60-
**/ios/Flutter/Flutter.framework
61-
**/ios/Flutter/Generated.xcconfig
62-
**/ios/Flutter/app.flx
63-
**/ios/Flutter/app.zip
64-
**/ios/Flutter/flutter_assets/
65-
**/ios/Flutter/flutter_export_environment.sh
66-
**/ios/ServiceDefinitions.json
67-
**/ios/Runner/GeneratedPluginRegistrant.*
30+
build/
6831

69-
# Exceptions to above rules.
70-
!**/ios/**/default.mode1v3
71-
!**/ios/**/default.mode2v3
72-
!**/ios/**/default.pbxuser
73-
!**/ios/**/default.perspectivev3
74-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
7532

7633
pubspec.lock
7734
example/pubspec.lock

.metadata

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: eb6877bf926e5454379e42c95d49dcd60952dc62
8-
channel: v1.9.1-hotfixes
7+
revision: "2524052335ec76bb03e04ede244b071f1b86d190"
8+
channel: "stable"
99

1010
project_type: package

CHANGELOG.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
## 3.0.0
1+
2+
## 3.0.1
3+
24
> 2023-09-11
35
4-
- 适配flutter 3.13
6+
- Adapter Flutter 3.1
57

68
## 2.0.0
7-
> 2021-08-08
89

9-
- 支持 null-safety
10+
> 2021-08-08
1011
11-
## 0.1.1
12-
> 移除无用代码
12+
- support null-safety
1313

1414
## 0.1.0
15+
1516
> 2020-03-25
1617
17-
- 五角星
18-
- 仪表盘
19-
- 圆弧
20-
- 时钟
21-
- 水波纹进度
22-
- 自定义状态图
18+
- Five-pointed star
19+
- Instrument board
20+
- Arc
21+
- Clock
22+
- Water ripple progress
23+
- Custom State Map

DEVNODE.md

Whitespace-only changes.

analysis_options.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

example/.gitignore

+11-40
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml
@@ -22,52 +23,22 @@
2223

2324
# Flutter/Dart/Pub related
2425
**/doc/api/
26+
**/ios/Flutter/.last_build_id
2527
.dart_tool/
2628
.flutter-plugins
29+
.flutter-plugins-dependencies
2730
.packages
2831
.pub-cache/
2932
.pub/
3033
/build/
3134

32-
# Android related
33-
**/android/**/gradle-wrapper.jar
34-
**/android/.gradle
35-
**/android/captures/
36-
**/android/gradlew
37-
**/android/gradlew.bat
38-
**/android/local.properties
39-
**/android/**/GeneratedPluginRegistrant.java
35+
# Symbolication related
36+
app.*.symbols
4037

41-
# iOS/XCode related
42-
**/ios/**/*.mode1v3
43-
**/ios/**/*.mode2v3
44-
**/ios/**/*.moved-aside
45-
**/ios/**/*.pbxuser
46-
**/ios/**/*.perspectivev3
47-
**/ios/**/*sync/
48-
**/ios/**/.sconsign.dblite
49-
**/ios/**/.tags*
50-
**/ios/**/.vagrant/
51-
**/ios/**/DerivedData/
52-
**/ios/**/Icon?
53-
**/ios/**/Pods/
54-
**/ios/**/.symlinks/
55-
**/ios/**/profile
56-
**/ios/**/xcuserdata
57-
**/ios/.generated/
58-
**/ios/Flutter/App.framework
59-
**/ios/Flutter/Flutter.framework
60-
**/ios/Flutter/Generated.xcconfig
61-
**/ios/Flutter/app.flx
62-
**/ios/Flutter/app.zip
63-
**/ios/Flutter/flutter_assets/
64-
**/ios/Flutter/flutter_export_environment.sh
65-
**/ios/ServiceDefinitions.json
66-
**/ios/Runner/GeneratedPluginRegistrant.*
38+
# Obfuscation related
39+
app.*.map.json
6740

68-
# Exceptions to above rules.
69-
!**/ios/**/default.mode1v3
70-
!**/ios/**/default.mode2v3
71-
!**/ios/**/default.pbxuser
72-
!**/ios/**/default.perspectivev3
73-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

example/.metadata

+37-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: eb6877bf926e5454379e42c95d49dcd60952dc62
8-
channel: v1.9.1-hotfixes
7+
revision: "2524052335ec76bb03e04ede244b071f1b86d190"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
17+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
18+
- platform: android
19+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
20+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
21+
- platform: ios
22+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
23+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
24+
- platform: linux
25+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
26+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
27+
- platform: macos
28+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
29+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
30+
- platform: web
31+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
32+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
33+
- platform: windows
34+
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
35+
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
# mini_canvas_example
1+
# example
22

3-
Demonstrates how to use the mini_canvas plugin.
3+
A new Flutter project.
44

5+
## Getting Started
56

7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13+
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

example/analysis_options.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

example/android/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

+23-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,12 +22,19 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2825
android {
29-
compileSdkVersion 30
26+
namespace "com.example.example"
27+
compileSdkVersion 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+
}
3038

3139
sourceSets {
3240
main.java.srcDirs += 'src/main/kotlin'
@@ -35,8 +43,10 @@ android {
3543
defaultConfig {
3644
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3745
applicationId "com.example.example"
38-
minSdkVersion 16
39-
targetSdkVersion 30
46+
// You can update the following values to match your application needs.
47+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48+
minSdkVersion flutter.minSdkVersion
49+
targetSdkVersion flutter.targetSdkVersion
4050
versionCode flutterVersionCode.toInteger()
4151
versionName flutterVersionName
4252
}
@@ -54,6 +64,4 @@ flutter {
5464
source '../..'
5565
}
5666

57-
dependencies {
58-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59-
}
67+
dependencies {}

example/android/app/src/debug/AndroidManifest.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.example">
3-
<!-- Flutter needs it to communicate with the running application
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
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

0 commit comments

Comments
 (0)