x1ongzhu 6 anos atrás
pai
commit
e78bef9db0

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-# electric_contest
+# mobleCyberGamesApp
 
 A new Flutter project.
 

+ 1 - 1
android/app/build.gradle

@@ -33,7 +33,7 @@ android {
 
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
-        applicationId "com.example.electriccontest"
+        applicationId "com.izouma.mobilecybergames"
         minSdkVersion 16
         targetSdkVersion 27
         versionCode flutterVersionCode.toInteger()

+ 2 - 2
android/app/src/main/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.electriccontest">
+    package="com.izouma.mobilecybergames">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
@@ -14,7 +14,7 @@
          FlutterApplication and put your custom class here. -->
     <application
         android:name="io.flutter.app.FlutterApplication"
-        android:label="electric_contest"
+        android:label="全民电竞"
         android:icon="@mipmap/ic_launcher">
         <activity
             android:name=".MainActivity"

+ 1 - 1
android/app/src/main/java/com/example/electriccontest/MainActivity.java → android/app/src/main/java/com/izouma/mobilecybergames/MainActivity.java

@@ -1,4 +1,4 @@
-package com.example.electriccontest;
+package com.izouma.mobilecybergames;
 
 import android.os.Bundle;
 import io.flutter.app.FlutterActivity;

+ 19 - 0
android/app/src/main/java/com/izouma/mobilecybergames/ScreenStreamPlugin.java

@@ -0,0 +1,19 @@
+package com.izouma.mobilecybergames;
+
+import io.flutter.plugin.common.MethodCall;
+import io.flutter.plugin.common.MethodChannel;
+
+public class ScreenStreamPlugin implements MethodChannel.MethodCallHandler {
+    @Override
+    public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
+
+    }
+
+    public boolean start(String url) {
+        return false;
+    }
+
+    public boolean stop() {
+        return true;
+    }
+}

+ 3 - 3
ios/Runner.xcodeproj/project.pbxproj

@@ -327,7 +327,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.electricContest;
+				PRODUCT_BUNDLE_IDENTIFIER = com.izouma.mobilecybergames;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
@@ -452,7 +452,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.electricContest;
+				PRODUCT_BUNDLE_IDENTIFIER = com.izouma.mobilecybergames;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
@@ -475,7 +475,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.electricContest;
+				PRODUCT_BUNDLE_IDENTIFIER = com.izouma.mobilecybergames;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				VERSIONING_SYSTEM = "apple-generic";
 			};

+ 1 - 1
ios/Runner/Info.plist

@@ -11,7 +11,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
-	<string>electric_contest</string>
+	<string>全民电竞</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

+ 4 - 2
lib/main.dart

@@ -12,7 +12,9 @@ import 'pages/loginFirst.dart';
 
 class MobileCyberGamesApp extends StatelessWidget {
   final Store<AppState> store;
+
   MobileCyberGamesApp(this.store);
+
   @override
   Widget build(BuildContext context) {
     return StoreProvider(
@@ -30,9 +32,9 @@ void main() async {
   ));
   final prefs = await SharedPreferences.getInstance();
   HttpManager.token = prefs.getString('token') ??
-      "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkOWU0MDdhNy1iODU2LTQ0ZjAtYmM1Yy0yMGI4NmY4MWM4MTEiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MDczODk4MCwic3ViIjoiODQ2NjQiLCJleHAiOjE1NTA5OTgxODB9.sowgrK2LHLiVAZL4MFC2rgapD9ves8nCyZKlKaWtydY";
+      "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZWM2OTMxMy01Yjc3LTRlMTctOTcwOC0wYTZhM2JhZmZhM2EiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MTA3OTMzMCwic3ViIjoiODQ3MDMiLCJleHAiOjE1NTEzMzg1MzB9.6olL1T38rYRLBwKtTbFSI4cEMAbQf4iWVr1xXLObu8g";
   Result result = await HttpManager.get("userInfo/getUserInfo");
-  AppState state = AppState();
+  AppState state = AppState.empty();
   if (result.success && result.data != null) {
     state.isLogin = true;
     UserInfo userInfo = UserInfo.fromJson(result.data);

+ 8 - 2
lib/redux/AppState.dart

@@ -1,8 +1,14 @@
-import 'package:electric_contest/model/UserInfo.dart';
+import '../model/UserInfo.dart';
 
 class AppState {
   bool isLogin = false;
   UserInfo userInfo;
+
+  AppState(this.isLogin, this.userInfo);
+
+  AppState.empty();
 }
 
-AppState appReducer(AppState state, action) {}
+AppState appReducer(AppState state, action) {
+  return AppState.empty();
+}

+ 2 - 2
pubspec.yaml

@@ -1,5 +1,5 @@
-name: electric_contest
-description: Universal electric contest
+name: mobile_cyber_game_app
+description: Universal mobile cyber games app
 
 version: 1.0.0+1