mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 10:33:44 +02:00
fix: add some spacing between the post author and it's title
This commit is contained in:
parent
13ba6ada07
commit
5abc859c24
2 changed files with 35 additions and 38 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
## Next
|
||||||
|
|
||||||
|
- Add minimal spacing between a post author and title in the post widget
|
||||||
|
|
||||||
## 5.1.1
|
## 5.1.1
|
||||||
|
|
||||||
- Be honest about which Dart and Flutter versions we support
|
- Be honest about which Dart and Flutter versions we support
|
||||||
|
|
|
@ -97,7 +97,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10.0),
|
||||||
Text(
|
Text(
|
||||||
widget.options.nameBuilder?.call(widget.post.creator) ??
|
widget.options.nameBuilder?.call(widget.post.creator) ??
|
||||||
widget.post.creator?.fullName ??
|
widget.post.creator?.fullName ??
|
||||||
|
@ -137,7 +137,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
.options.theme.textStyles.deletePostStyle ??
|
.options.theme.textStyles.deletePostStyle ??
|
||||||
theme.textTheme.bodyMedium,
|
theme.textTheme.bodyMedium,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8.0),
|
||||||
widget.options.theme.deleteIcon ??
|
widget.options.theme.deleteIcon ??
|
||||||
Icon(
|
Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
|
@ -158,7 +158,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
),
|
),
|
||||||
// image of the post
|
// image of the post
|
||||||
if (widget.post.imageUrl != null || widget.post.image != null) ...[
|
if (widget.post.imageUrl != null || widget.post.image != null) ...[
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8.0),
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: widget.options.postWidgetHeight != null ? 1 : 0,
|
flex: widget.options.postWidgetHeight != null ? 1 : 0,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
|
@ -204,9 +204,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
const SizedBox(
|
const SizedBox(height: 8.0),
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
// post information
|
// post information
|
||||||
if (widget.options.iconsWithValues) ...[
|
if (widget.options.iconsWithValues) ...[
|
||||||
Row(
|
Row(
|
||||||
|
@ -238,14 +236,10 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
size: widget.options.iconSize,
|
size: widget.options.iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(width: 4.0),
|
||||||
width: 4,
|
|
||||||
),
|
|
||||||
Text('${widget.post.likes}'),
|
Text('${widget.post.likes}'),
|
||||||
if (widget.post.reactionEnabled) ...[
|
if (widget.post.reactionEnabled) ...[
|
||||||
const SizedBox(
|
const SizedBox(width: 8.0),
|
||||||
width: 8,
|
|
||||||
),
|
|
||||||
IconButton(
|
IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
constraints: const BoxConstraints(),
|
constraints: const BoxConstraints(),
|
||||||
|
@ -260,9 +254,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
height: widget.options.iconSize,
|
height: widget.options.iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(width: 4.0),
|
||||||
width: 4,
|
|
||||||
),
|
|
||||||
Text('${widget.post.reaction}'),
|
Text('${widget.post.reaction}'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -286,7 +278,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
size: widget.options.iconSize,
|
size: widget.options.iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8.0),
|
||||||
if (widget.post.reactionEnabled) ...[
|
if (widget.post.reactionEnabled) ...[
|
||||||
IconButton(
|
IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
@ -307,9 +299,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
||||||
const SizedBox(
|
const SizedBox(height: 8),
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
|
|
||||||
if (widget.options.itemInfoBuilder != null) ...[
|
if (widget.options.itemInfoBuilder != null) ...[
|
||||||
widget.options.itemInfoBuilder!(
|
widget.options.itemInfoBuilder!(
|
||||||
|
@ -320,25 +310,27 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
post: widget.post,
|
post: widget.post,
|
||||||
options: widget.options,
|
options: widget.options,
|
||||||
),
|
),
|
||||||
Text.rich(
|
const SizedBox(height: 4.0),
|
||||||
TextSpan(
|
Row(
|
||||||
text: widget.options.nameBuilder?.call(widget.post.creator) ??
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.options.nameBuilder?.call(widget.post.creator) ??
|
||||||
widget.post.creator?.fullName ??
|
widget.post.creator?.fullName ??
|
||||||
widget.options.translations.anonymousUser,
|
widget.options.translations.anonymousUser,
|
||||||
style: widget.options.theme.textStyles.listCreatorNameStyle ??
|
style: widget.options.theme.textStyles.listCreatorNameStyle ??
|
||||||
theme.textTheme.titleSmall!.copyWith(
|
theme.textTheme.titleSmall!.copyWith(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
children: [
|
),
|
||||||
TextSpan(
|
const SizedBox(width: 4.0),
|
||||||
text: widget.post.title,
|
Text(
|
||||||
|
widget.post.title,
|
||||||
style: widget.options.theme.textStyles.listPostTitleStyle ??
|
style: widget.options.theme.textStyles.listPostTitleStyle ??
|
||||||
theme.textTheme.bodySmall,
|
theme.textTheme.bodySmall,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 4.0),
|
||||||
const SizedBox(height: 4),
|
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
@ -350,9 +342,10 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (widget.options.dividerBuilder != null)
|
if (widget.options.dividerBuilder != null) ...[
|
||||||
widget.options.dividerBuilder!(),
|
widget.options.dividerBuilder!(),
|
||||||
],
|
],
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue