diff --git a/lib/pages/home/classify/goods_page.dart b/lib/pages/home/classify/goods_page.dart index 9f116cb..cba4ff1 100644 --- a/lib/pages/home/classify/goods_page.dart +++ b/lib/pages/home/classify/goods_page.dart @@ -807,12 +807,13 @@ class _GoodsPageState extends BaseStoreState { 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 { Expanded( child: Center( child: Text( - '- - - - - - -', + '- - - - - -', style: TextStyle( color: Color(0xFFCCCCCC), fontSize: rSP(15), height: 1, ), + maxLines: 1, ), ), ), diff --git a/lib/pages/live/live_stream/small_window/small_window_widget.dart b/lib/pages/live/live_stream/small_window/small_window_widget.dart index ef31527..2f3300b 100644 --- a/lib/pages/live/live_stream/small_window/small_window_widget.dart +++ b/lib/pages/live/live_stream/small_window/small_window_widget.dart @@ -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 { @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 { 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), diff --git a/lib/pages/shop/shop_page_column_info_widget.dart b/lib/pages/shop/shop_page_column_info_widget.dart index 71257ea..9ce1df0 100644 --- a/lib/pages/shop/shop_page_column_info_widget.dart +++ b/lib/pages/shop/shop_page_column_info_widget.dart @@ -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, diff --git a/lib/pages/user/widget/user_page_assets_view.dart b/lib/pages/user/widget/user_page_assets_view.dart index 15b4862..9ef84d3 100644 --- a/lib/pages/user/widget/user_page_assets_view.dart +++ b/lib/pages/user/widget/user_page_assets_view.dart @@ -96,7 +96,7 @@ class _UserPageAssetsViewState extends BaseStoreState { children: [ 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: "查看明细",