From 7e1c978132a37f739515bbff49e030b0b6e620a0 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Tue, 16 Mar 2021 14:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=A1=B5=E9=9D=A2=E4=B8=BE?= =?UTF-8?q?=E6=8A=A5=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live_stream/live_stream_view_page.dart | 172 ++++++++---------- 1 file changed, 74 insertions(+), 98 deletions(-) diff --git a/lib/pages/live/live_stream/live_stream_view_page.dart b/lib/pages/live/live_stream/live_stream_view_page.dart index 234c762..e4033da 100644 --- a/lib/pages/live/live_stream/live_stream_view_page.dart +++ b/lib/pages/live/live_stream/live_stream_view_page.dart @@ -647,109 +647,85 @@ class _LiveStreamViewPageState extends State { padding: EdgeInsets.zero, onPressed: () { _focusNode.unfocus(); - ActionSheet.show( - context, - items: ['举报'], - listener: (index) { - Navigator.pop(context); - //fake - Future.delayed( - Duration(milliseconds: 1000), () { - GSDialog.of(context) - .showSuccess(context, '举报成功'); - }); - }, - ); - }, - child: CustomImageButton( - padding: EdgeInsets.zero, - onPressed: () { - _focusNode.unfocus(); - showModalBottomSheet( - context: context, - builder: (context) { - return Container( - width: rSize(200), - color: Colors.black87, - child: Padding( - padding: EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - CustomImageButton( - onPressed: () { - Navigator.pop( - context); - setState(() { - chatObjects.clear(); - }); - }, - child: Column( - children: [ - SizedBox( - width: rSize(60), - height: rSize(60), - child: Icon( - Icons.clear_all, - size: rSize(30), - ), + showModalBottomSheet( + context: context, + builder: (context) { + return Container( + width: rSize(200), + color: Colors.black87, + child: Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + CustomImageButton( + onPressed: () { + Navigator.pop(context); + setState(() { + chatObjects.clear(); + }); + }, + child: Column( + children: [ + SizedBox( + width: rSize(60), + height: rSize(60), + child: Icon( + Icons.clear_all, + size: rSize(30), ), - Text('清屏'), - ], - ), + ), + Text('清屏'), + ], ), - CustomImageButton( - onPressed: () { - Navigator.pop( - context); - if (UserManager - .instance - .haveLogin) { - showModalBottomSheet( - context: context, - builder: - (context) { - return LiveReportView(); - }, - ); - } else { - showToast( - '未登陆,请先登陆'); - CRoute.pushReplace( - context, - UserPage()); - } - }, - child: Column( - children: [ - SizedBox( - width: rSize(60), - height: rSize(60), - child: Icon( - Icons - .report_problem, - size: rSize(30), - ), + ), + CustomImageButton( + onPressed: () { + Navigator.pop(context); + if (UserManager.instance + .haveLogin) { + showModalBottomSheet( + context: context, + builder: (context) { + return LiveReportView(); + }, + ); + } else { + showToast('未登陆,请先登陆'); + CRoute.pushReplace( + context, + UserPage()); + } + }, + child: Column( + children: [ + SizedBox( + width: rSize(60), + height: rSize(60), + child: Icon( + Icons + .report_problem, + size: rSize(30), ), - Text('举报'), - ], - ), + ), + Text('举报'), + ], ), - ], - ), - ], - ), + ), + ], + ), + ], ), - ); - }); - }, - child: Image.asset( - R.ASSETS_LIVE_LIVE_MORE_PNG, - width: rSize(32), - height: rSize(32), - ), + ), + ); + }); + }, + child: Image.asset( + R.ASSETS_LIVE_LIVE_MORE_PNG, + width: rSize(32), + height: rSize(32), ), ), SizedBox(width: rSize(10)),