diff --git a/lib/ui/screens/authorized_group_page_screen.dart b/lib/ui/screens/authorized_group_page_screen.dart index f000276..8329fef 100644 --- a/lib/ui/screens/authorized_group_page_screen.dart +++ b/lib/ui/screens/authorized_group_page_screen.dart @@ -50,19 +50,19 @@ class _AuthorizedGroupPageScreenState List<_GroupPageTab> get _tabs => [ // Posts list _GroupPageTab( - widget: GroupPostsSection(group: _group), + widget: (c) => GroupPostsSection(group: _group), label: tr("Posts"), ), // About the group _GroupPageTab( - widget: AboutGroupSection(group: _group), + widget: (c) => AboutGroupSection(group: _group), label: tr("About"), ) ]..addAll(_group.isAtLeastModerator ? [ _GroupPageTab( - widget: GroupMembersSection(groupID: _group.id), + widget: (c) => GroupMembersSection(groupID: _group.id), label: tr("Members"), ), ] @@ -91,7 +91,7 @@ class _AuthorizedGroupPageScreenState child: Column( children: [ _buildGroupPageHeader(), - Container( + Material( color: _headerColor, child: TabBar( tabs: _tabs.map((e) => e.tab).toList(), @@ -101,7 +101,7 @@ class _AuthorizedGroupPageScreenState Expanded( child: TabBarView( controller: _tabController, - children: _tabs.map((e) => e.widget).toList(), + children: _tabs.map((e) => e.widget(context)).toList(), ), ), ], @@ -172,7 +172,7 @@ class _AuthorizedGroupPageScreenState } class _GroupPageTab { - final Widget widget; + final WidgetBuilder widget; final String label; const _GroupPageTab({