liuyuqi-dellpc 1 year ago
parent
commit
5b293abf5e
4 changed files with 6 additions and 6 deletions
  1. 1 1
      lib/game_board.dart
  2. 0 3
      lib/models/config.dart
  3. 3 2
      lib/models/game_setting.dart
  4. 2 0
      lib/pages/setting_page.dart

+ 1 - 1
lib/game_board.dart

@@ -99,6 +99,7 @@ class _GameBoardState extends State<GameBoard> {
 
   @override
   Widget build(BuildContext context) {
+
     return Scaffold(
       appBar: AppBar(
         title: Text(context.l10n.appTitle),
@@ -213,7 +214,6 @@ class _GameBoardState extends State<GameBoard> {
                     });
                   }
                   gamer.newGame();
-                  //mode = null;
                 });
               },
             ),

+ 0 - 3
lib/models/config.dart

@@ -3,7 +3,4 @@ class Config {
   static String login = "$host/login";
   static String register = "$host/register";
   static String logout = "$host/logout";
-
-
-  
 }

+ 3 - 2
lib/models/game_setting.dart

@@ -1,9 +1,10 @@
 import 'dart:convert';
-
 import 'package:shared_preferences/shared_preferences.dart';
-
 import 'engine_type.dart';
 
+/// Description: 游戏设置,shared_preferences存储
+/// Time       : 05/06/2023 Saturday
+/// Author     : liuyuqi.gov@msn.cn
 class GameSetting {
   static SharedPreferences? storage;
   static GameSetting? _instance;

+ 2 - 0
lib/pages/setting_page.dart

@@ -16,6 +16,8 @@ class SettingPage extends StatefulWidget {
 }
 
 class _SettingPageState extends State<SettingPage> {
+  
+  // 全局设置
   GameSetting? setting;
 
   @override