diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index c08f5fdf..6c69a993 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -47,8 +47,7 @@ class VideoDetailController extends GetxController { showReplyReplyPanel() { PersistentBottomSheetController? ctr = scaffoldKey.currentState?.showBottomSheet((BuildContext context) { - return - VideoReplyReplyPanel( + return VideoReplyReplyPanel( oid: oid, rpid: fRpid, closePanel: ()=> { diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index 9f175f67..847bdfb2 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -23,7 +23,7 @@ class ReplyItem extends StatelessWidget { child: Column( children: [ Padding( - padding: const EdgeInsets.fromLTRB(12, 6, 8, 0), + padding: const EdgeInsets.fromLTRB(12, 2, 8, 0), child: content(context), ), // Divider( diff --git a/lib/pages/video/detail/replyNew/view.dart b/lib/pages/video/detail/replyNew/view.dart index 9b7832af..3f530d7e 100644 --- a/lib/pages/video/detail/replyNew/view.dart +++ b/lib/pages/video/detail/replyNew/view.dart @@ -69,8 +69,7 @@ class _VideoReplyNewDialogState extends State ); if (result['status']) { SmartDialog.showToast(result['data']['success_toast']); - } else { - } + } else {} } @override @@ -95,45 +94,24 @@ class _VideoReplyNewDialogState extends State @override Widget build(BuildContext context) { return Container( - height: MediaQuery.of(context).size.height - MediaQuery.of(context).size.width * 9 / 16 - 48, + height: MediaQuery.of(context).size.height - + MediaQuery.of(context).size.width * 9 / 16 - + 45, clipBehavior: Clip.hardEdge, decoration: BoxDecoration( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(16), - topRight: Radius.circular(16), - ), - color: Theme.of(context).colorScheme.background), + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(16), + topRight: Radius.circular(16), + ), + color: Theme.of(context).colorScheme.background, + ), child: Column( mainAxisSize: MainAxisSize.min, children: [ - SizedBox( - height: 55, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const SizedBox(width: 20), - Text('发表评论', style: Theme.of(context).textTheme.titleMedium), - const Spacer(), - IconButton( - onPressed: () => Get.back(), - icon: const Icon(Icons.close), - ), - const SizedBox(width: 12), - ], - ), - ), - Divider( - height: 1, - color: Theme.of(context).dividerColor.withOpacity(0.1), - ), Expanded( child: Container( padding: const EdgeInsets.only( - top: 12, right: 15, left: 15, bottom: 10), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.background, - borderRadius: BorderRadius.circular(16), - ), + top: 6, right: 15, left: 15, bottom: 10), child: Form( key: _formKey, autovalidateMode: AutovalidateMode.onUserInteraction, @@ -182,13 +160,14 @@ class _VideoReplyNewDialogState extends State )), ), const Spacer(), - TextButton(onPressed: () => submitReplyAdd(), child: const Text('发送')) + TextButton( + onPressed: () => submitReplyAdd(), child: const Text('发送')) ], ), ), AnimatedSize( curve: Curves.easeInOut, - duration: const Duration(milliseconds: 500), + duration: const Duration(milliseconds: 300), child: SizedBox( width: double.infinity, height: _keyboardHeight, diff --git a/lib/pages/video/detail/replyReply/view.dart b/lib/pages/video/detail/replyReply/view.dart index 7535bf60..ac3c45fd 100644 --- a/lib/pages/video/detail/replyReply/view.dart +++ b/lib/pages/video/detail/replyReply/view.dart @@ -60,7 +60,7 @@ class _VideoReplyReplyPanelState extends State { @override Widget build(BuildContext context) { return Container( - height: Get.size.height - Get.size.width * 9 / 16 - 48, + height: Get.size.height - Get.size.width * 9 / 16 - 45, color: Theme.of(context).colorScheme.background, child: Column( children: [ @@ -101,6 +101,7 @@ class _VideoReplyReplyPanelState extends State { controller: _videoReplyReplyController.scrollController, slivers: [ if (widget.firstFloor != null) ...[ + const SliverToBoxAdapter(child: SizedBox(height: 10)), SliverToBoxAdapter( child: ReplyItem( replyItem: widget.firstFloor, @@ -109,7 +110,7 @@ class _VideoReplyReplyPanelState extends State { ), SliverToBoxAdapter( child: Divider( - height: 30, + height: 20, color: Theme.of(context).dividerColor.withOpacity(0.1), thickness: 6, ), @@ -137,19 +138,22 @@ class _VideoReplyReplyPanelState extends State { height: MediaQuery.of(context) .padding .bottom + - 60, + 100, child: Center( - child: Obx(() => Text( - _videoReplyReplyController - .noMore.value - ? '没有更多了' - : '加载中')), + child: Obx( + () => Text(_videoReplyReplyController + .noMore.value + ? '没有更多了' + : '加载中'), + ), ), ); } else { - return ReplyItem( - replyItem: _videoReplyReplyController - .replyList[index], + return Material( + child: ReplyItem( + replyItem: _videoReplyReplyController + .replyList[index], + ), ); } }, diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 1b92e1ac..a361dfa9 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -40,6 +40,7 @@ class _VideoDetailPageState extends State child: Stack( children: [ Scaffold( + resizeToAvoidBottomInset: false, key: videoDetailController.scaffoldKey, body: ExtendedNestedScrollView( headerSliverBuilder: @@ -55,6 +56,7 @@ class _VideoDetailPageState extends State MediaQuery.of(context).size.width * 9 / 16, collapsedHeight: MediaQuery.of(context).size.width * 9 / 16, + backgroundColor: Colors.black, flexibleSpace: FlexibleSpaceBar( background: Padding( padding: EdgeInsets.only( @@ -68,6 +70,7 @@ class _VideoDetailPageState extends State return Hero( tag: videoDetailController.heroTag, child: NetworkImgLayer( + type: 'emote', src: videoDetailController.videoItem['pic'], width: maxWidth, height: maxHeight,