diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index f82c864b..77020826 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -221,7 +221,7 @@ class _DynamicsPageState extends State } else { return const SliverToBoxAdapter( child: SizedBox( - height: 115, + height: 90, child: UpPanelSkeleton(), )); } diff --git a/lib/pages/dynamics/widgets/up_panel.dart b/lib/pages/dynamics/widgets/up_panel.dart index 96ae30d5..81dc2d78 100644 --- a/lib/pages/dynamics/widgets/up_panel.dart +++ b/lib/pages/dynamics/widgets/up_panel.dart @@ -51,72 +51,56 @@ class _UpPanelState extends State { floating: true, pinned: false, delegate: _SliverHeaderDelegate( - height: 115, + height: 90, child: Container( - height: 115, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Theme.of(context).dividerColor.withOpacity(0.1), - blurRadius: 10, - spreadRadius: 2, - ), - ], - color: Theme.of(context).colorScheme.surface, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only( - top: 5, left: 12, right: 12, bottom: 5), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - '最常访问', - style: TextStyle(fontWeight: FontWeight.bold), - ), - SizedBox( - height: 26, - child: TextButton( - style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.zero), - ), - onPressed: () => Get.toNamed('/follow'), - child: - const Text('查看全部', style: TextStyle(fontSize: 12)), + height: 90, + color: Theme.of(context).colorScheme.background, + child: Row( + children: [ + Expanded( + child: ListView( + scrollDirection: Axis.horizontal, + controller: scrollController, + children: [ + const SizedBox(width: 10), + for (int i = 0; i < liveList.length; i++) ...[ + upItemBuild(liveList[i], i) + ], + VerticalDivider( + indent: 20, + endIndent: 40, + width: 26, + color: Theme.of(context).primaryColor.withOpacity(0.5), ), - ) - ], - ), - ), - Expanded( - child: ListView( - scrollDirection: Axis.horizontal, - controller: scrollController, - children: [ - const SizedBox(width: 10), - for (int i = 0; i < liveList.length; i++) ...[ - upItemBuild(liveList[i], i) + for (int i = 0; i < upList.length; i++) ...[ + upItemBuild(upList[i], i) + ], + const SizedBox(width: 10), ], - VerticalDivider( - indent: 15, - endIndent: 35, - width: 26, - color: Theme.of(context).primaryColor.withOpacity(0.5), + ), + ), + Material( + child: InkWell( + onTap: () => Get.toNamed('/follow'), + child: Container( + height: 100, + padding: const EdgeInsets.only(left: 10, right: 10), + color: Theme.of(context) + .colorScheme + .secondaryContainer + .withOpacity(0.3), + child: Center( + child: Text( + '全部', + style: + TextStyle(color: Theme.of(context).primaryColor), + ), + ), ), - for (int i = 0; i < upList.length; i++) ...[ - upItemBuild(upList[i], i) - ], - const SizedBox(width: 10), - ], + ), ), - ) - ], - ), - ), + ], + )), ), ); } @@ -141,6 +125,7 @@ class _UpPanelState extends State { } else { moveDistance = (upLen + liveLen) * itemWidth + 46 - screenWidth; } + data.hasUpdate = false; scrollController.animateTo( moveDistance, duration: const Duration(milliseconds: 500), @@ -194,7 +179,7 @@ class _UpPanelState extends State { width: contentWidth, child: Text( data.uname, - overflow: TextOverflow.fade, + overflow: TextOverflow.ellipsis, softWrap: false, textAlign: TextAlign.center, style: TextStyle( @@ -242,57 +227,37 @@ class UpPanelSkeleton extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: - const EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: const [ - Text( - '最常访问', - style: TextStyle(fontWeight: FontWeight.bold), + return ListView.builder( + scrollDirection: Axis.horizontal, + physics: const NeverScrollableScrollPhysics(), + itemCount: 10, + itemBuilder: ((context, index) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 0), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 49, + height: 49, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.onInverseSurface, + borderRadius: const BorderRadius.all( + Radius.circular(24), + ), + ), + ), + Container( + margin: const EdgeInsets.only(top: 6), + width: 45, + height: 12, + color: Theme.of(context).colorScheme.onInverseSurface, ), ], ), - ), - Expanded( - child: ListView.builder( - scrollDirection: Axis.horizontal, - physics: const NeverScrollableScrollPhysics(), - itemCount: 10, - itemBuilder: ((context, index) => Padding( - padding: - const EdgeInsets.symmetric(horizontal: 10, vertical: 0), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: 49, - height: 49, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.onInverseSurface, - borderRadius: const BorderRadius.all( - Radius.circular(24), - ), - ), - ), - Container( - margin: const EdgeInsets.only(top: 6), - width: 45, - height: 12, - color: Theme.of(context).colorScheme.onInverseSurface, - ), - ], - ), - )), - ), - ) - ], + ); + }), ); } } diff --git a/lib/pages/member/view.dart b/lib/pages/member/view.dart index eed507a2..24da624c 100644 --- a/lib/pages/member/view.dart +++ b/lib/pages/member/view.dart @@ -170,6 +170,10 @@ class _MemberPageState extends State 1 ? '个人认证:' : '企业认证:', + style: TextStyle( + color: Theme.of(context) + .primaryColor, + ), ), Text( _memberController.memberInfo diff --git a/lib/pages/video/detail/introduction/view.dart b/lib/pages/video/detail/introduction/view.dart index 1b7a2b6a..1eb22665 100644 --- a/lib/pages/video/detail/introduction/view.dart +++ b/lib/pages/video/detail/introduction/view.dart @@ -375,18 +375,15 @@ class _VideoInfoState extends State with TickerProviderStateMixin { }, child: Row( children: [ - Hero( - tag: videoItem['owner'].mid + 99, - child: NetworkImgLayer( - type: 'avatar', - src: !widget.loadingStatus - ? widget.videoDetail!.owner!.face - : videoItem['owner'].face, - width: 38, - height: 38, - fadeInDuration: Duration.zero, - fadeOutDuration: Duration.zero, - ), + NetworkImgLayer( + type: 'avatar', + src: !widget.loadingStatus + ? widget.videoDetail!.owner!.face + : videoItem['owner'].face, + width: 38, + height: 38, + fadeInDuration: Duration.zero, + fadeOutDuration: Duration.zero, ), const SizedBox(width: 14), Column(