git@h5.yoqi.me 1 year ago
parent
commit
a38b676aed

+ 1 - 1
.devcontainer/Dockerfile

@@ -1 +1 @@
-FROM jianboy/flutter-dev-container:2.10.5
+FROM jianboy/flutter-dev-container:3.0.5

+ 2 - 2
.devcontainer/devcontainer.json

@@ -2,7 +2,7 @@
 // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
 // https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8
 {
-    "name": "Java 8",
+    "name": "Java 11",
     "build": {
         "dockerfile": "Dockerfile",
         "args": {
@@ -22,7 +22,7 @@
         "java.configuration.runtimes": [
             {
                 "default": true,
-                "name": "JavaSE-1.8",
+                "name": "JavaSE-11",
                 "path": "/usr/local/sdkman/candidates/java/current"
             }
         ]

+ 3 - 3
.github/workflows/build.yml

@@ -17,18 +17,18 @@ jobs:
         uses: actions/setup-java@v2
         with:
           distribution: 'adopt'
-          java-version: "8.x"
+          java-version: "11"
 
       - name: Setup gradle
         uses: eskatos/gradle-command-action@v1
         with:
-          gradle-version: 6.5
+          gradle-version: 7.3.3
 
       - name: Flutter action
         uses: subosito/flutter-action@v1.5.3
         with:
           channel: "stable"
-          flutter-version: "2.0.5"
+          flutter-version: "3.0.5"
       
       - name: Cache Dependencies
         id: cache

+ 1 - 1
android/build.gradle

@@ -5,7 +5,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:4.1.0'
+        classpath 'com.android.tools.build:gradle:7.2.2'
     }
 }
 

+ 1 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

+ 7 - 3
lib/model/block_info.dart

@@ -2,14 +2,18 @@ class BlockInfo {
   BlockInfo(
       {required this.value,
       required this.current,
-      this.before,
+      this.before ,
       this.myis = true}) {
-    this.before = this.before == null ? this.current : this.before;
+    if (this.before == null) {
+      this.before = this.current;
+    } else {
+      this.before = this.before;
+    }
   }
 
   int value;
   int current;
-  int before;
+  int? before;
   bool needMove = false;
   bool needCombine = false;
   bool myis = false;

+ 1 - 1
lib/model/game_status.dart

@@ -2,7 +2,7 @@
 class GameStatus {
   GameStatus({
     required this.adds,
-    this.moves,
+    required this.moves,
     required this.scores,
     required this.total,
     required this.end,

+ 4 - 4
pubspec.lock

@@ -77,7 +77,7 @@ packages:
       name: ffi
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "1.2.1"
+    version: "2.0.1"
   file:
     dependency: transitive
     description:
@@ -181,7 +181,7 @@ packages:
       name: path_provider_windows
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.0.7"
+    version: "2.1.2"
   platform:
     dependency: transitive
     description:
@@ -333,7 +333,7 @@ packages:
       name: win32
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.5.2"
+    version: "2.7.0"
   xdg_directories:
     dependency: transitive
     description:
@@ -343,4 +343,4 @@ packages:
     version: "0.2.0+1"
 sdks:
   dart: ">=2.17.6 <3.0.0"
-  flutter: ">=2.8.0"
+  flutter: ">=3.0.0"

+ 3 - 3
pubspec.yaml

@@ -12,12 +12,12 @@ dependencies:
   flutter_localizations: # 国际化
     sdk: flutter
   intl: ^0.17.0
-  cupertino_icons: ^1.0.3 # ios风格图标
+  cupertino_icons: ^1.0.5 # ios风格图标
   flutter_screenutil: ^5.5.3+2 # 屏幕工具
-  device_info: ^2.0.2
+  device_info: ^2.0.3
   flutter_redux: ^0.10.0 # 状态管理
   redux_thunk: ^0.4.0
-  shared_preferences: ^2.0.7
+  shared_preferences: ^2.0.15
 
 dev_dependencies:
   flutter_test: