diff --git a/lib/pages/article/view.dart b/lib/pages/article/view.dart index b9f93c93b..461201332 100644 --- a/lib/pages/article/view.dart +++ b/lib/pages/article/view.dart @@ -347,25 +347,28 @@ class _ArticlePageState extends CommonDynPageState { src: controller.summary.author?.face, ), const SizedBox(width: 10), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - controller.summary.author?.name ?? '', - style: TextStyle( - fontSize: theme.textTheme.titleSmall!.fontSize, - ), - ), - if (pubTime != null) + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Text( - DateFormatUtils.format(pubTime), + controller.summary.author?.name ?? '', style: TextStyle( - color: theme.colorScheme.outline, fontSize: - theme.textTheme.labelSmall!.fontSize, + theme.textTheme.titleSmall!.fontSize, ), ), - ], + if (pubTime != null) + Text( + DateFormatUtils.format(pubTime), + style: TextStyle( + color: theme.colorScheme.outline, + fontSize: + theme.textTheme.labelSmall!.fontSize, + ), + ), + ], + ), ), ], ), diff --git a/lib/pages/article/widgets/html_render.dart b/lib/pages/article/widgets/html_render.dart index 6b655156b..76b0e9320 100644 --- a/lib/pages/article/widgets/html_render.dart +++ b/lib/pages/article/widgets/html_render.dart @@ -49,12 +49,10 @@ Widget htmlRender({ return Hero( tag: imgUrl, child: GestureDetector( - onTap: () { - PageUtils.imageView( - imgList: [SourceModel(url: imgUrl)], - quality: 60, - ); - }, + onTap: () => PageUtils.imageView( + imgList: [SourceModel(url: imgUrl)], + quality: 60, + ), child: CachedNetworkImage( width: size, height: size, diff --git a/lib/pages/article/widgets/opus_content.dart b/lib/pages/article/widgets/opus_content.dart index 7400797e5..7df0fb631 100644 --- a/lib/pages/article/widgets/opus_content.dart +++ b/lib/pages/article/widgets/opus_content.dart @@ -191,12 +191,10 @@ class OpusContent extends StatelessWidget { return Hero( tag: pic.url!, child: GestureDetector( - onTap: () { - PageUtils.imageView( - imgList: [SourceModel(url: pic.url!)], - quality: 60, - ); - }, + onTap: () => PageUtils.imageView( + imgList: [SourceModel(url: pic.url!)], + quality: 60, + ), child: Center( child: CachedNetworkImage( width: width, diff --git a/lib/pages/article_list/view.dart b/lib/pages/article_list/view.dart index 6926d9799..709f32e0e 100644 --- a/lib/pages/article_list/view.dart +++ b/lib/pages/article_list/view.dart @@ -137,9 +137,12 @@ class _ArticleListPageState extends State with GridMixin { if (_controller.author != null) ...[ const SizedBox(height: 10), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => Get.toNamed('/member?mid=${_controller.author!.mid}'), child: Row( + spacing: 10, + mainAxisSize: MainAxisSize.min, children: [ NetworkImgLayer( width: 30, @@ -147,8 +150,7 @@ class _ArticleListPageState extends State with GridMixin { src: _controller.author!.face, type: ImageType.avatar, ), - const SizedBox(width: 10), - Text(_controller.author!.name!), + Flexible(child: Text(_controller.author!.name!)), ], ), ), diff --git a/lib/pages/dynamics_topic/view.dart b/lib/pages/dynamics_topic/view.dart index 74365efa9..f84146875 100644 --- a/lib/pages/dynamics_topic/view.dart +++ b/lib/pages/dynamics_topic/view.dart @@ -191,6 +191,7 @@ class _DynTopicPageState extends State with DynMixin { '/member?mid=${response.topicCreator!.uid}', ), child: Row( + spacing: 10, mainAxisSize: MainAxisSize.min, children: [ NetworkImgLayer( @@ -199,7 +200,6 @@ class _DynTopicPageState extends State with DynMixin { src: response.topicCreator!.face!, type: ImageType.avatar, ), - const SizedBox(width: 10), Flexible( child: Text( response.topicCreator!.name!, diff --git a/lib/pages/video/introduction/pgc/view.dart b/lib/pages/video/introduction/pgc/view.dart index 1281094de..4997c1ec2 100644 --- a/lib/pages/video/introduction/pgc/view.dart +++ b/lib/pages/video/introduction/pgc/view.dart @@ -144,11 +144,9 @@ class _PgcIntroPageState extends State { clipBehavior: Clip.none, children: [ GestureDetector( - onTap: () { - PageUtils.imageView( - imgList: [SourceModel(url: item.cover!)], - ); - }, + onTap: () => PageUtils.imageView( + imgList: [SourceModel(url: item.cover!)], + ), child: Hero( tag: item.cover!, child: NetworkImgLayer( diff --git a/lib/pages/video/member/view.dart b/lib/pages/video/member/view.dart index 630da9487..c511bae4d 100644 --- a/lib/pages/video/member/view.dart +++ b/lib/pages/video/member/view.dart @@ -397,11 +397,9 @@ class _HorizontalMemberPageState extends State { } Widget _buildAvatar(String face) => GestureDetector( - onTap: () { - PageUtils.imageView( - imgList: [SourceModel(url: face)], - ); - }, + onTap: () => PageUtils.imageView( + imgList: [SourceModel(url: face)], + ), child: NetworkImgLayer( src: face, type: ImageType.avatar, diff --git a/lib/pages/whisper_block/view.dart b/lib/pages/whisper_block/view.dart index 77c16feee..4d6e96439 100644 --- a/lib/pages/whisper_block/view.dart +++ b/lib/pages/whisper_block/view.dart @@ -183,6 +183,7 @@ class _WhisperBlockPageState extends State { ), GestureDetector( onTap: Get.back, + behavior: HitTestBehavior.opaque, child: Icon( Icons.clear, color: theme.colorScheme.onSurfaceVariant, diff --git a/lib/pages/whisper_detail/view.dart b/lib/pages/whisper_detail/view.dart index 3df80ad2c..3a4588dd3 100644 --- a/lib/pages/whisper_detail/view.dart +++ b/lib/pages/whisper_detail/view.dart @@ -72,6 +72,7 @@ class _WhisperDetailPageState ), ), title: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { if (_whisperDetailController.mid != null) { feedBack(); @@ -79,6 +80,7 @@ class _WhisperDetailPageState } }, child: Row( + mainAxisSize: MainAxisSize.min, children: [ NetworkImgLayer( width: 34, diff --git a/pubspec.lock b/pubspec.lock index 1c38b3af1..64513fff4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -223,7 +223,7 @@ packages: description: path: "." ref: main - resolved-ref: "9986919515728fb501e3e62bf4d277dfcd96b799" + resolved-ref: "6fee1a981775bee401224c2d622ce50768313746" url: "https://github.com/bggRGjQaUbCoE/canvas_danmaku.git" source: git version: "0.2.6"