|
|
@@ -1,8 +1,10 @@
|
|
|
import 'dart:async';
|
|
|
+import 'dart:io';
|
|
|
import 'dart:ui';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/painting.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
+import 'package:intl/intl.dart';
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
import 'package:battery/battery.dart';
|
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
|
@@ -58,6 +60,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
|
|
|
bool showJiexie = false;
|
|
|
bool showHelloWord = false;
|
|
|
bool showWait = false;
|
|
|
+ num race = 10;
|
|
|
|
|
|
//获取房间信息
|
|
|
Future<void> getRoomInfo(type) async {
|
|
|
@@ -472,6 +475,13 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
|
|
|
};
|
|
|
|
|
|
Future.delayed(Duration.zero, () async {
|
|
|
+ Result res2 = await HttpManager.get('systemVariable/get', data: {'name': "ticketPrice"});
|
|
|
+ if (res2.success) {
|
|
|
+ print(res2.data);
|
|
|
+ setState(() {
|
|
|
+ race = double.parse(res2.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
// showSucessInfo(3);
|
|
|
getRoomInfo('first');
|
|
|
userInfo = StoreProvider.of<AppState>(context).state.userInfo;
|
|
|
@@ -706,66 +716,74 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
|
|
|
),
|
|
|
|
|
|
Container(
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
|
- margin: EdgeInsets.fromLTRB(15, 7, 15, 0),
|
|
|
- decoration: BoxDecoration(color: Color(0xFF23253C), borderRadius: BorderRadius.all(Radius.circular(4))),
|
|
|
- child: Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: <Widget>[
|
|
|
- Column(
|
|
|
- children: <Widget>[
|
|
|
- Row(
|
|
|
- children: <Widget>[
|
|
|
- Image.asset('images/icon_jifen.png'),
|
|
|
- Text(
|
|
|
- 'x${houseInfo.bonus * houseInfo.houseLevel.firstRatio / 100}',
|
|
|
- style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- Container(
|
|
|
- height: 3,
|
|
|
- ),
|
|
|
- Text('第一名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
- ],
|
|
|
- ),
|
|
|
- Column(
|
|
|
- children: <Widget>[
|
|
|
- Row(
|
|
|
- children: <Widget>[
|
|
|
- Image.asset('images/icon_jifen.png'),
|
|
|
- Text(
|
|
|
- 'x${houseInfo.bonus * houseInfo.houseLevel.secondRatio / 100}',
|
|
|
- style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- Container(
|
|
|
- height: 3,
|
|
|
- ),
|
|
|
- Text('第二名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
- ],
|
|
|
- ),
|
|
|
- Column(
|
|
|
- children: <Widget>[
|
|
|
- Row(
|
|
|
- children: <Widget>[
|
|
|
- Image.asset('images/icon_jifen.png'),
|
|
|
- Text(
|
|
|
- 'x${houseInfo.bonus * houseInfo.houseLevel.thirdRatio / 100}',
|
|
|
- style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- Container(
|
|
|
- height: 3,
|
|
|
- ),
|
|
|
- Text('第三名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
- ],
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
|
+ margin: EdgeInsets.fromLTRB(15, 7, 15, 0),
|
|
|
+ decoration: BoxDecoration(color: Color(0xFF23253C), borderRadius: BorderRadius.all(Radius.circular(4))),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: <Widget>[
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[
|
|
|
+ Column(
|
|
|
+ children: <Widget>[
|
|
|
+ Row(
|
|
|
+ children: <Widget>[
|
|
|
+ Image.asset('images/icon_jifen.png'),
|
|
|
+ Text(
|
|
|
+ 'x${houseInfo.bonus * houseInfo.houseLevel.firstRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.firstRatio / 100}',
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ height: 3,
|
|
|
+ ),
|
|
|
+ Text('第一名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Column(
|
|
|
+ children: <Widget>[
|
|
|
+ Row(
|
|
|
+ children: <Widget>[
|
|
|
+ Image.asset('images/icon_jifen.png'),
|
|
|
+ Text(
|
|
|
+ 'x${houseInfo.bonus * houseInfo.houseLevel.secondRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.secondRatio / 100}',
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ height: 3,
|
|
|
+ ),
|
|
|
+ Text('第二名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Column(
|
|
|
+ children: <Widget>[
|
|
|
+ Row(
|
|
|
+ children: <Widget>[
|
|
|
+ Image.asset('images/icon_jifen.png'),
|
|
|
+ Text(
|
|
|
+ 'x${houseInfo.bonus * houseInfo.houseLevel.thirdRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.thirdRatio / 100}',
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ height: 3,
|
|
|
+ ),
|
|
|
+ Text('第三名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ height: 10,
|
|
|
+ ),
|
|
|
+ Text('注:上方显示数值为前三名的“当前奖励/最高奖励”',style: TextStyle(color: Colors.white30,fontSize: 12),)
|
|
|
+ ],
|
|
|
+ )),
|
|
|
|
|
|
timeStr != ''
|
|
|
? Container(
|
|
|
@@ -834,7 +852,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
|
|
|
Text.rich(TextSpan(children: [
|
|
|
TextSpan(text: '完成本房间任务目标后,'),
|
|
|
TextSpan(
|
|
|
- text: '切记立刻点击悬浮窗',
|
|
|
+ text: Platform.isIOS ? '切记立刻返回应用' : '切记立刻点击悬浮窗',
|
|
|
style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
|
|
|
),
|
|
|
TextSpan(text: '回到房间')
|