diff --git a/lib/ui/screens/group_sections/group_posts_section.dart b/lib/ui/screens/group_sections/group_posts_section.dart index e8a7ada..14cfc4c 100644 --- a/lib/ui/screens/group_sections/group_posts_section.dart +++ b/lib/ui/screens/group_sections/group_posts_section.dart @@ -22,12 +22,14 @@ class GroupPostsSection extends StatefulWidget { class _GroupPostsSectionState extends State { final _postsKey = GlobalKey(); + final _formKey = GlobalKey(); /// Add create post target Widget _buildPostCreationArea() { if (!widget.group.canCreatePost) return Container(); return PostCreateFormWidget( + key: _formKey, postTarget: PostTarget.GROUP_PAGE, targetID: widget.group.id, onCreated: () => _postsKey.currentState!.loadPostsList(getOlder: false), diff --git a/lib/ui/widgets/post_create_form_widget.dart b/lib/ui/widgets/post_create_form_widget.dart index ae418e3..3292b75 100644 --- a/lib/ui/widgets/post_create_form_widget.dart +++ b/lib/ui/widgets/post_create_form_widget.dart @@ -38,10 +38,10 @@ class PostCreateFormWidget extends StatefulWidget { }) : super(key: key); @override - _PostCreateFormWidgetState createState() => _PostCreateFormWidgetState(); + PostCreateFormWidgetState createState() => PostCreateFormWidgetState(); } -class _PostCreateFormWidgetState extends State { +class PostCreateFormWidgetState extends State { // Helpers final PostsHelper _postHelper = PostsHelper();