修复若干问题

master
zhang 5 years ago
parent 9a3a8e19a1
commit d661d299d4

@ -807,12 +807,13 @@ class _GoodsPageState extends BaseStoreState<GoodsPage> {
Expanded(
child: Center(
child: Text(
'- - - - - - -',
'- - - - - -',
style: TextStyle(
color: Color(0xFFCCCCCC),
fontSize: rSP(15),
height: 1,
),
maxLines: 1,
),
),
),
@ -882,12 +883,13 @@ class _GoodsPageState extends BaseStoreState<GoodsPage> {
Expanded(
child: Center(
child: Text(
'- - - - - - -',
'- - - - - -',
style: TextStyle(
color: Color(0xFFCCCCCC),
fontSize: rSP(15),
height: 1,
),
maxLines: 1,
),
),
),

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:recook/constants/header.dart';
import 'package:tencent_live_fluttify/tencent_live_fluttify.dart';
class SmallWindowWidget extends StatefulWidget {
@ -24,8 +25,8 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
@override
void initState() {
super.initState();
_topPos = ScreenUtil.statusBarHeight + 20;
_leftPos = 20;
_topPos = ScreenUtil.screenHeightDp - 20 - _height - 55;
_leftPos = _leftPos = ScreenUtil.screenWidthDp - 20 - _width;
}
@override
@ -39,78 +40,83 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
return AnimatedPositioned(
left: _isHide ? -_width : _leftPos,
top: _topPos,
child: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: CloudVideo(
onCloudVideoCreated: (controller) async {
_livePlayer = await LivePlayer.create();
await _livePlayer.setPlayerView(controller);
_livePlayer.startPlay(widget.url, type: PlayType.RTMP);
},
),
),
GestureDetector(
onTap: () {
Navigator.pop(context);
},
onPanUpdate: (detail) {
setState(() {
_topPos = detail.globalPosition.dy - _subHeight;
_leftPos = detail.globalPosition.dx - _subWidth;
});
},
onPanStart: (detail) {
setState(() {
_isMoving = true;
});
},
onPanEnd: (detail) {
_isMoving = false;
if (_leftPos < 20) _leftPos = 20;
if (_topPos < ScreenUtil.statusBarHeight + 20)
_topPos = (20 + ScreenUtil.statusBarHeight);
if ((_leftPos + _width + 20) > ScreenUtil.screenWidthDp)
_leftPos = ScreenUtil.screenWidthDp - 20 - _width;
if ((_topPos + _height + 55 + 20) > ScreenUtil.screenHeightDp)
_topPos = ScreenUtil.screenHeightDp - 20 - _height - 55;
setState(() {});
},
child: Container(
height: _height,
width: _width,
color: Colors.transparent,
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.white,width: rSize(1)),
),
child: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: CloudVideo(
onCloudVideoCreated: (controller) async {
_livePlayer = await LivePlayer.create();
await _livePlayer.setPlayerView(controller);
_livePlayer.startPlay(widget.url, type: PlayType.RTMP);
},
),
),
),
Positioned(
right: 10,
top: 10,
child: GestureDetector(
GestureDetector(
onTap: () {
Navigator.pop(context);
},
onPanUpdate: (detail) {
setState(() {
_isHide = true;
_topPos = detail.globalPosition.dy - _subHeight;
_leftPos = detail.globalPosition.dx - _subWidth;
});
},
onPanStart: (detail) {
setState(() {
_isMoving = true;
});
},
onPanEnd: (detail) {
_isMoving = false;
if (_leftPos < 20) _leftPos = 20;
if (_topPos < ScreenUtil.statusBarHeight + 20)
_topPos = (20 + ScreenUtil.statusBarHeight);
if ((_leftPos + _width + 20) > ScreenUtil.screenWidthDp)
_leftPos = ScreenUtil.screenWidthDp - 20 - _width;
if ((_topPos + _height + 55 + 20) > ScreenUtil.screenHeightDp)
_topPos = ScreenUtil.screenHeightDp - 20 - _height - 55;
setState(() {});
},
child: Container(
height: 20,
width: 20,
child: Icon(
Icons.clear,
size: 16,
color: Colors.black,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
height: _height,
width: _width,
color: Colors.transparent,
),
),
Positioned(
right: 5,
top: 5,
child: GestureDetector(
onTap: () {
setState(() {
_isHide = true;
});
},
child: Container(
height: 20,
width: 20,
child: Icon(
Icons.clear,
size: 16,
color: Colors.black,
),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.circular(10),
),
),
),
),
),
],
],
),
),
curve: Curves.easeInOutCubic,
duration: _isMoving ? Duration.zero : Duration(milliseconds: 300),

@ -344,7 +344,7 @@ class _ShopPageColumnInfoWidgetState
Text(
title,
style: TextStyle(
color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold),
),
Container(
width: 5,

@ -96,7 +96,7 @@ class _UserPageAssetsViewState extends BaseStoreState<UserPageAssetsView> {
children: <Widget>[
Image.asset(icon, width: 28, height: 28,),
Container(width: 3,),
Text(title, style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),),
Text(title, style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold),),
Spacer(),
CustomImageButton(
title: "查看明细",

Loading…
Cancel
Save