mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 10:33:44 +02:00
fix: like and dismiss textfield
fixed unlimited liking after creating a post and multiline textfield not being dismissible
This commit is contained in:
parent
ce093f86d4
commit
27d1ef5fac
3 changed files with 179 additions and 165 deletions
|
@ -1,3 +1,8 @@
|
|||
## 2.0.1
|
||||
|
||||
- Fixed multiline textfield not being dismissible.
|
||||
- Fixed liking a new post you created.
|
||||
|
||||
## 1.0.0 - November 27 2023
|
||||
|
||||
- Improved TimelineService with support for pagination
|
||||
|
|
|
@ -106,7 +106,9 @@ class _TimelinePostCreationScreenState
|
|||
}
|
||||
|
||||
var theme = Theme.of(context);
|
||||
return Padding(
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Padding(
|
||||
padding: widget.options.padding,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
|
@ -257,7 +259,6 @@ class _TimelinePostCreationScreenState
|
|||
});
|
||||
},
|
||||
),
|
||||
// const Spacer(),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: (widget.options.buttonBuilder != null)
|
||||
|
@ -268,7 +269,13 @@ class _TimelinePostCreationScreenState
|
|||
enabled: editingDone,
|
||||
)
|
||||
: ElevatedButton(
|
||||
onPressed: editingDone ? onPostCreated : null,
|
||||
onPressed: editingDone
|
||||
? () async {
|
||||
await onPostCreated();
|
||||
await widget.service.postService
|
||||
.fetchPosts(null);
|
||||
}
|
||||
: null,
|
||||
child: Text(
|
||||
widget.options.translations.checkPost,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
|
@ -278,6 +285,7 @@ class _TimelinePostCreationScreenState
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -357,7 +357,8 @@ class _TimelinePostScreenState extends State<_TimelinePostScreen> {
|
|||
'${post.likes} ${widget.options.translations.likesTitle}',
|
||||
style: widget
|
||||
.options.theme.textStyles.postLikeTitleAndAmount ??
|
||||
theme.textTheme.titleSmall,
|
||||
theme.textTheme.titleSmall
|
||||
?.copyWith(color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text.rich(
|
||||
|
|
Loading…
Reference in a new issue