From 4f347634db14243fac2d0e8198486af3ecffc65e Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Tue, 22 Apr 2025 11:16:40 +0200 Subject: [PATCH] fix: use listPostCreatorTitleStyle for post creator rather than postCreatorTitleStyle It's shown in a list and the rest of the text in the widget is already styled through the list* parameters, so it only makes sense for this one to be too. --- CHANGELOG.md | 1 + .../lib/src/screens/timeline_post_screen.dart | 2 +- .../lib/src/widgets/timeline_post_widget.dart | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f700bf6..f3cb830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Next - Add minimal spacing between a post author and title in the post widget +- Use listPostCreatorTitleStyle for post creator localizations when showing posts in a list ## 5.1.1 diff --git a/packages/flutter_timeline_view/lib/src/screens/timeline_post_screen.dart b/packages/flutter_timeline_view/lib/src/screens/timeline_post_screen.dart index 450f207..aca8e76 100644 --- a/packages/flutter_timeline_view/lib/src/screens/timeline_post_screen.dart +++ b/packages/flutter_timeline_view/lib/src/screens/timeline_post_screen.dart @@ -213,7 +213,7 @@ class _TimelinePostScreenState extends State { post.creator?.fullName ?? widget.options.translations.anonymousUser, style: widget.options.theme.textStyles - .postCreatorTitleStyle ?? + .listPostCreatorTitleStyle ?? theme.textTheme.titleSmall!.copyWith( color: Colors.black, ), diff --git a/packages/flutter_timeline_view/lib/src/widgets/timeline_post_widget.dart b/packages/flutter_timeline_view/lib/src/widgets/timeline_post_widget.dart index 1ff7447..cef71c5 100644 --- a/packages/flutter_timeline_view/lib/src/widgets/timeline_post_widget.dart +++ b/packages/flutter_timeline_view/lib/src/widgets/timeline_post_widget.dart @@ -103,7 +103,7 @@ class _TimelinePostWidgetState extends State { widget.post.creator?.fullName ?? widget.options.translations.anonymousUser, style: widget.options.theme.textStyles - .postCreatorTitleStyle ?? + .listPostCreatorTitleStyle ?? theme.textTheme.titleSmall!.copyWith( color: Colors.black, ),