|
|
@@ -1,7 +1,7 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
import '../widgets/HomeDrawer.dart';
|
|
|
-import '../styles/colors.dart';
|
|
|
-import '../pages/setting.dart';
|
|
|
+import './setting.dart';
|
|
|
+import './CreateRoom.dart';
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
@override
|
|
|
@@ -85,7 +85,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
Text(
|
|
|
"568",
|
|
|
style: TextStyle(
|
|
|
- color: WHITE_COLOR,
|
|
|
+ color: Colors.white,
|
|
|
fontSize: 68,
|
|
|
fontFamily: 'DINEngschrift',
|
|
|
),
|
|
|
@@ -93,7 +93,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
Text(
|
|
|
"K",
|
|
|
style: TextStyle(
|
|
|
- color: WHITE_COLOR,
|
|
|
+ color: Colors.white,
|
|
|
fontSize: 36,
|
|
|
fontFamily: 'DINEngschrift',
|
|
|
),
|
|
|
@@ -110,12 +110,12 @@ class _HomePageState extends State<HomePage> {
|
|
|
Text(
|
|
|
"当前排名",
|
|
|
style: TextStyle(
|
|
|
- color: WHITE_COLOR, fontSize: 13),
|
|
|
+ color: Colors.white, fontSize: 13),
|
|
|
),
|
|
|
Text(
|
|
|
"98686",
|
|
|
style: TextStyle(
|
|
|
- color: WHITE_COLOR, fontSize: 13),
|
|
|
+ color: Colors.white, fontSize: 13),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -134,11 +134,11 @@ class _HomePageState extends State<HomePage> {
|
|
|
children: <Widget>[
|
|
|
Text(
|
|
|
"赛季奖金",
|
|
|
- style: TextStyle(color: WHITE_COLOR, fontSize: 14),
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14),
|
|
|
),
|
|
|
Text(
|
|
|
"刺激战场之大逃杀",
|
|
|
- style: TextStyle(color: WHITE_COLOR, fontSize: 14),
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -154,7 +154,24 @@ class _HomePageState extends State<HomePage> {
|
|
|
HomeMenu(
|
|
|
"images/home_icon_fangjian.png",
|
|
|
"创建房间",
|
|
|
- onTapHomeMenu: () {},
|
|
|
+ onTapHomeMenu: () {
|
|
|
+ Navigator.of(context).push(PageRouteBuilder(
|
|
|
+ opaque: false,
|
|
|
+ transitionDuration: Duration(milliseconds: 300),
|
|
|
+ transitionsBuilder: (BuildContext context,
|
|
|
+ Animation<double> animation,
|
|
|
+ Animation<double> secondaryAnimation,
|
|
|
+ Widget child) {
|
|
|
+ return FadeTransition(
|
|
|
+ opacity: CurvedAnimation(
|
|
|
+ parent: animation, curve: Curves.linear),
|
|
|
+ child: child,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ pageBuilder: (BuildContext context, _, __) {
|
|
|
+ return CreateRoom();
|
|
|
+ }));
|
|
|
+ },
|
|
|
),
|
|
|
HomeMenu(
|
|
|
"images/home_icon_kuaisu.png",
|
|
|
@@ -222,7 +239,7 @@ class HomeMenu extends StatelessWidget {
|
|
|
),
|
|
|
Text(
|
|
|
title,
|
|
|
- style: TextStyle(color: WHITE_COLOR, fontSize: 14),
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14),
|
|
|
textAlign: TextAlign.center,
|
|
|
)
|
|
|
],
|