diff --git a/lib/pages/home/search_page.dart b/lib/pages/home/search_page.dart index 7d1b563..f90a638 100644 --- a/lib/pages/home/search_page.dart +++ b/lib/pages/home/search_page.dart @@ -341,6 +341,7 @@ class _SearchPageState extends BaseStoreState ), Expanded( child: CupertinoTextField( + autofocus: true, keyboardType: TextInputType.text, controller: _textEditController, textInputAction: TextInputAction.search, diff --git a/lib/pages/live/live_stream/live_playback_view_page.dart b/lib/pages/live/live_stream/live_playback_view_page.dart index 054a00b..5e11b2f 100644 --- a/lib/pages/live/live_stream/live_playback_view_page.dart +++ b/lib/pages/live/live_stream/live_playback_view_page.dart @@ -2,6 +2,7 @@ import 'package:chewie/chewie.dart'; import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:many_like/many_like.dart'; +import 'package:oktoast/oktoast.dart'; import 'package:recook/constants/api.dart'; import 'package:recook/constants/header.dart'; import 'package:recook/manager/http_manager.dart'; @@ -146,6 +147,7 @@ class _LivePlaybackViewPageState extends State { LiveAPI.addFollow, {'followUserId': _streamInfoModel.userId}, ); + showToast('关注成功'); }, title: _streamInfoModel.nickname, subTitle: '点赞数 ${_streamInfoModel.praise}', @@ -190,19 +192,68 @@ class _LivePlaybackViewPageState extends State { children: [ CustomImageButton( onPressed: () { - ActionSheet.show( - context, - items: ['举报'], - listener: (index) { - Navigator.pop(context); - //fake - Future.delayed( - Duration(milliseconds: 1000), () { - GSDialog.of(context) - .showSuccess(context, '举报成功'); + showModalBottomSheet( + context: context, + builder: (BuildContext) { + return Container( + width: rSize(200), + height: rSize(200), + color: Colors.black87, + child: Padding( + padding: EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + Column( + children: [ + SizedBox( + width: rSize(60), + height: rSize(60), + child: Icon( + + Icons.clear_all, + + size: rSize(30),), + ), + Text('清屏'), + ], + ), + ], + ), + Row( + children: [ + Column( + children: [ + SizedBox( + width: rSize(60), + height: rSize(60), + child: Icon(Icons.report_problem, + size: rSize(30),), + ), + Text('举报'), + ], + ), + ], + ), + ], + ), + ), + ); }); - }, - ); + //ActionSheet.show( + //context, + //items: ['举报'], + //listener: (index) { + //Navigator.pop(context); + //fake + //Future.delayed( + // Duration(milliseconds: 1000), () { + //GSDialog.of(context) + // .showSuccess(context, '举报成功'); + //}); + //}, + //); }, child: Image.asset( R.ASSETS_LIVE_LIVE_MORE_PNG, @@ -217,24 +268,7 @@ class _LivePlaybackViewPageState extends State { // height: rSize(32), // ), SizedBox(width: rSize(10)), - ManyLikeButton( - child: Image.asset( - R.ASSETS_LIVE_LIVE_LIKE_PNG, - width: rSize(32), - height: rSize(32), - ), - popChild: Image.asset( - R.ASSETS_LIVE_LIVE_LIKE_PNG, - width: rSize(32), - height: rSize(32), - ), - onTap: () { - HttpManager.post( - LiveAPI.liveLike, - {'liveItemId': widget.id}, - ); - }, - ), + SizedBox(width: rSize(10)), Spacer(), CustomImageButton( diff --git a/lib/pages/live/live_stream/pick_search_goods_page.dart b/lib/pages/live/live_stream/pick_search_goods_page.dart index 5d02505..d7c0e91 100644 --- a/lib/pages/live/live_stream/pick_search_goods_page.dart +++ b/lib/pages/live/live_stream/pick_search_goods_page.dart @@ -36,6 +36,7 @@ class _PickSearchGoodsPageState extends State { leading: RecookBackButton(), actions: [rWBox(10)], title: TextField( + autofocus: true, controller: _editingController, style: TextStyle( color: Color(0xFF333333), diff --git a/lib/pages/live/video/pick_topic_page.dart b/lib/pages/live/video/pick_topic_page.dart index 7062c02..b0fd983 100644 --- a/lib/pages/live/video/pick_topic_page.dart +++ b/lib/pages/live/video/pick_topic_page.dart @@ -75,6 +75,7 @@ class _PickTopicPageState extends State { right: rSize(15), ), child: TextField( + autofocus: true, onChanged: (text) { if (TextUtil.isEmpty(text)) { setState(() {