panhui 6 лет назад
Родитель
Сommit
90fff57224
6 измененных файлов с 37 добавлено и 0 удалено
  1. 6 0
      android/app/build.gradle
  2. 1 0
      lib/main.dart
  3. 2 0
      lib/pages/HomePage.dart
  4. 5 0
      lib/pages/roomInfo.dart
  5. 22 0
      lib/widget/SplashPageState.dart
  6. 1 0
      pubspec.yaml

+ 6 - 0
android/app/build.gradle

@@ -40,7 +40,13 @@ android {
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         ndk {
             // abiFilters 'armeabi-v7a'
+            abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a',     
         }
+        manifestPlaceholders = [
+            JPUSH_PKGNAME : applicationId,
+            JPUSH_APPKEY : "59c5293593306ecb18120462", // NOTE: JPush 上注册的包名对应的 Appkey.
+            JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
+        ]
     }
     signingConfigs {
         debug {

+ 1 - 0
lib/main.dart

@@ -13,6 +13,7 @@ import 'pages/loginFirst.dart';
 import 'package:flutter_localizations/flutter_localizations.dart';
 import './Localizations.dart';
 
+
 class MobileCyberGamesApp extends StatelessWidget {
   final Store<AppState> store;
 

+ 2 - 0
lib/pages/HomePage.dart

@@ -25,6 +25,7 @@ class HomePage extends StatefulWidget {
 class _HomePageState extends State<HomePage> {
   List<CompetitionSeason> seasonList = [];
   int nowIndex = 0;
+  PageController _pageController;
 
   void getSeasonInfo() async {
     Toast.show(context, '加载中', -1, 'loading');
@@ -89,6 +90,7 @@ class _HomePageState extends State<HomePage> {
   @override
   void initState() {
     super.initState();
+    _pageController=PageController(initialPage:0);
     Future.delayed(const Duration(seconds: 1), () {
       getSeasonInfo();
     });

+ 5 - 0
lib/pages/roomInfo.dart

@@ -78,6 +78,11 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         },
         pageBuilder: (BuildContext context, _, __) {
           return StartWindow();
+
+
+
+
+          
         },
       ),
     );

+ 22 - 0
lib/widget/SplashPageState.dart

@@ -0,0 +1,22 @@
+import 'package:flutter/material.dart';
+import 'package:jpush_flutter/jpush_flutter.dart';
+
+class SplashPage extends StatefulWidget {
+  @override
+  SplashPageState createState() => SplashPageState();
+}
+
+class SplashPageState extends State<SplashPage> {
+
+  JPush jPush = new JPush();
+  String registerId;
+  _startupJpush() {
+    jPush.setup(
+        appKey: "59c5293593306ecb18120462",
+        channel: "developer-default",
+        debug: true);
+  }
+
+  @override
+  Widget build(BuildContext context) {}
+}

+ 1 - 0
pubspec.yaml

@@ -30,6 +30,7 @@ dependencies:
   shared_preferences: ^0.5.1
   package_info: ^0.4.0
   video_player: ^0.10.0
+  jpush_flutter: ^0.0.11
 
 dev_dependencies:
   build_runner: ^1.1.1