|
|
@@ -14,6 +14,7 @@ import 'TipList.dart';
|
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
|
import '../redux/AppState.dart';
|
|
|
import 'setting.dart';
|
|
|
+import '../widget/Dialog.dart';
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
@override
|
|
|
@@ -42,29 +43,30 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
|
|
}
|
|
|
|
|
|
void showBackDialog() {
|
|
|
- showDialog<Null>(
|
|
|
- context: context,
|
|
|
- barrierDismissible: false,
|
|
|
- builder: (BuildContext context) {
|
|
|
- return new AlertDialog(
|
|
|
- content: Container(
|
|
|
- height: 50,
|
|
|
- child: Text(
|
|
|
- '暂时没有进行中的房间,敬请期待...',
|
|
|
- style: TextStyle(color: Colors.black),
|
|
|
- ),
|
|
|
- ),
|
|
|
- actions: <Widget>[
|
|
|
- new FlatButton(
|
|
|
- child: new Text('确定'),
|
|
|
- onPressed: () {
|
|
|
- Navigator.of(context).pop();
|
|
|
- },
|
|
|
- ),
|
|
|
- ],
|
|
|
- );
|
|
|
- },
|
|
|
- ).then((val) {});
|
|
|
+ MyDialog.showDialog(context, '暂时没有进行中的房间,敬请期待...');
|
|
|
+ // showDialog<Null>(
|
|
|
+ // context: context,
|
|
|
+ // barrierDismissible: false,
|
|
|
+ // builder: (BuildContext context) {
|
|
|
+ // return new AlertDialog(
|
|
|
+ // content: Container(
|
|
|
+ // height: 50,
|
|
|
+ // child: Text(
|
|
|
+ // '暂时没有进行中的房间,敬请期待...',
|
|
|
+ // style: TextStyle(color: Colors.black),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // actions: <Widget>[
|
|
|
+ // new FlatButton(
|
|
|
+ // child: new Text('确定'),
|
|
|
+ // onPressed: () {
|
|
|
+ // Navigator.of(context).pop();
|
|
|
+ // },
|
|
|
+ // ),
|
|
|
+ // ],
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ // ).then((val) {});
|
|
|
}
|
|
|
|
|
|
void getOneRoom() async {
|
|
|
@@ -288,9 +290,10 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
|
|
double width = MediaQuery.of(context).size.width;
|
|
|
double height = MediaQuery.of(context).size.height;
|
|
|
double aspectRatio = 1;
|
|
|
- if (height / width < 17 / 9) {
|
|
|
- aspectRatio = width / (height - 334);
|
|
|
- }
|
|
|
+ // if (height / width < 20 / 9) {
|
|
|
+
|
|
|
+ // }
|
|
|
+ aspectRatio = width / (height - 350);
|
|
|
return Container(
|
|
|
child: GridView.count(
|
|
|
physics: new BouncingScrollPhysics(),
|