|
@@ -1,17 +1,13 @@
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import '../styles/colors.dart';
|
|
import '../styles/colors.dart';
|
|
|
-import 'package:dio/dio.dart';
|
|
|
|
|
-import '../styles/api.dart';
|
|
|
|
|
import 'dart:ui';
|
|
import 'dart:ui';
|
|
|
-import 'dart:convert';
|
|
|
|
|
|
|
+import '../plugins/ScreenStramPlugin.dart';
|
|
|
import '../net/HttpManager.dart';
|
|
import '../net/HttpManager.dart';
|
|
|
import '../net/Result.dart';
|
|
import '../net/Result.dart';
|
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
|
import '../redux/AppState.dart';
|
|
import '../redux/AppState.dart';
|
|
|
import '../model/HouseInfo.dart';
|
|
import '../model/HouseInfo.dart';
|
|
|
-import '../net/HttpManager.dart';
|
|
|
|
|
-import '../net/Result.dart';
|
|
|
|
|
import '../styles/totast.dart';
|
|
import '../styles/totast.dart';
|
|
|
import 'StartWindow.dart';
|
|
import 'StartWindow.dart';
|
|
|
import '../model/PlayerInfo.dart';
|
|
import '../model/PlayerInfo.dart';
|
|
@@ -99,6 +95,12 @@ class RoomInfoState extends State<RoomInfo>
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
if (data['statusFlag'] == 2) {
|
|
if (data['statusFlag'] == 2) {
|
|
|
//加入比赛成功,开始录屏
|
|
//加入比赛成功,开始录屏
|
|
|
|
|
+ bool success = await ScreenStreamPlugin.start(
|
|
|
|
|
+ 'rtmp://49.4.66.233:1935/myapp/' +
|
|
|
|
|
+ playerInfo.userId.toString() +
|
|
|
|
|
+ '?playerInfoId=' +
|
|
|
|
|
+ playerInfo.id.toString());
|
|
|
|
|
+ print('stream screen:' + success.toString());
|
|
|
Future.delayed(Duration(milliseconds: 100), () => showSucessInfo());
|
|
Future.delayed(Duration(milliseconds: 100), () => showSucessInfo());
|
|
|
} else {
|
|
} else {
|
|
|
// showBackDialog();
|
|
// showBackDialog();
|
|
@@ -124,9 +126,13 @@ class RoomInfoState extends State<RoomInfo>
|
|
|
actions: <Widget>[
|
|
actions: <Widget>[
|
|
|
new FlatButton(
|
|
new FlatButton(
|
|
|
child: new Text('完成比赛'),
|
|
child: new Text('完成比赛'),
|
|
|
- onPressed: () {
|
|
|
|
|
|
|
+ onPressed: () async {
|
|
|
|
|
+ Toast.show(context, '加载中', -1, 'loading');
|
|
|
HttpManager.post("playerInfo/update",
|
|
HttpManager.post("playerInfo/update",
|
|
|
data: {'id': playerInfo.id, 'statusFlag': 3});
|
|
data: {'id': playerInfo.id, 'statusFlag': 3});
|
|
|
|
|
+ bool success = await ScreenStreamPlugin.stop();
|
|
|
|
|
+ print('stop stream screen:' + success.toString());
|
|
|
|
|
+ Toast.hide();
|
|
|
Navigator.of(context).pop();
|
|
Navigator.of(context).pop();
|
|
|
},
|
|
},
|
|
|
),
|
|
),
|
|
@@ -700,7 +706,11 @@ class RankContentState extends State<RankContent> {
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: <Widget>[
|
|
children: <Widget>[
|
|
|
Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
|
|
Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
|
|
|
- Text('x' + (topList[_num - 1].bonus!=null?topList[_num - 1].bonus.toString():'0'),
|
|
|
|
|
|
|
+ Text(
|
|
|
|
|
+ 'x' +
|
|
|
|
|
+ (topList[_num - 1].bonus != null
|
|
|
|
|
+ ? topList[_num - 1].bonus.toString()
|
|
|
|
|
+ : '0'),
|
|
|
style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
|
|
style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
|
|
|
],
|
|
],
|
|
|
)
|
|
)
|