|
|
@@ -1,3 +1,5 @@
|
|
|
+import 'dart:io';
|
|
|
+
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/painting.dart';
|
|
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
|
|
@@ -254,7 +256,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
|
|
|
getBannerInfo();
|
|
|
getGame();
|
|
|
getRoomInfo();
|
|
|
-
|
|
|
+
|
|
|
if (timer != null) {
|
|
|
timer.cancel();
|
|
|
}
|
|
|
@@ -292,67 +294,69 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
|
|
|
color: Colors.transparent,
|
|
|
child: Builder(
|
|
|
builder: (context) => InkWell(
|
|
|
- onTap: () async {
|
|
|
- if (timer != null) {
|
|
|
- timer.cancel();
|
|
|
- }
|
|
|
- bool result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => TipList()));
|
|
|
- if (result) {
|
|
|
- timer = Timer.periodic(Duration(seconds: 2), (timer) {
|
|
|
- getUnreadMsg();
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- width: 30,
|
|
|
- height: 30,
|
|
|
- child: Stack(
|
|
|
- children: <Widget>[
|
|
|
- Center(
|
|
|
- child: Image.asset('images/home_icon_xiaoxi.png'),
|
|
|
- ),
|
|
|
- showBadge
|
|
|
- ? Positioned(
|
|
|
- right: 10,
|
|
|
- top: 12,
|
|
|
+ onTap: () async {
|
|
|
+ if (timer != null) {
|
|
|
+ timer.cancel();
|
|
|
+ }
|
|
|
+ bool result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => TipList()));
|
|
|
+ if (result) {
|
|
|
+ timer = Timer.periodic(Duration(seconds: 2), (timer) {
|
|
|
+ getUnreadMsg();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ width: 30,
|
|
|
+ height: 30,
|
|
|
+ child: Stack(
|
|
|
+ children: <Widget>[
|
|
|
+ Center(
|
|
|
+ child: Image.asset('images/home_icon_xiaoxi.png'),
|
|
|
+ ),
|
|
|
+ showBadge
|
|
|
+ ? Positioned(
|
|
|
+ right: 10,
|
|
|
+ top: 12,
|
|
|
+ child: Container(
|
|
|
+ padding: EdgeInsets.all(1),
|
|
|
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(100))),
|
|
|
+ child: Center(
|
|
|
child: Container(
|
|
|
- padding: EdgeInsets.all(1),
|
|
|
- decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(100))),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 3),
|
|
|
+ height: 12,
|
|
|
+ decoration: BoxDecoration(color: Color(0xFFD4504B), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
child: Center(
|
|
|
- child: Container(
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 3),
|
|
|
- height: 12,
|
|
|
- decoration: BoxDecoration(color: Color(0xFFD4504B), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
- child: Center(
|
|
|
- child: Text('${tipNum}', style: TextStyle(color: Colors.white, fontSize: 10)),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ child: Text('${tipNum}', style: TextStyle(color: Colors.white, fontSize: 10)),
|
|
|
),
|
|
|
),
|
|
|
- )
|
|
|
- : Container()
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Container()
|
|
|
+ ],
|
|
|
),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
actions: <Widget>[
|
|
|
- Container(
|
|
|
- width: 102,
|
|
|
- padding: EdgeInsets.all(15),
|
|
|
- child: LinearButton(
|
|
|
- btntext: '配置帮助',
|
|
|
- textColor: Color(0xFF2E3049),
|
|
|
- btnHeight: 26.0,
|
|
|
- colorList: [Color(0xFFFFB726), Color(0xFFFFB726)],
|
|
|
- textSize: 12.0,
|
|
|
- onTapHomeMenu: () {
|
|
|
- // showNotice();
|
|
|
- getPhoneInfo();
|
|
|
- },
|
|
|
- ),
|
|
|
- )
|
|
|
+ Platform.isIOS
|
|
|
+ ? Container()
|
|
|
+ : Container(
|
|
|
+ width: 102,
|
|
|
+ padding: EdgeInsets.all(15),
|
|
|
+ child: LinearButton(
|
|
|
+ btntext: '配置帮助',
|
|
|
+ textColor: Color(0xFF2E3049),
|
|
|
+ btnHeight: 26.0,
|
|
|
+ colorList: [Color(0xFFFFB726), Color(0xFFFFB726)],
|
|
|
+ textSize: 12.0,
|
|
|
+ onTapHomeMenu: () {
|
|
|
+ // showNotice();
|
|
|
+ getPhoneInfo();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ )
|
|
|
],
|
|
|
),
|
|
|
body: Container(
|