mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Improve group page
This commit is contained in:
parent
7dd91df471
commit
afeb8c4a7d
@ -50,19 +50,19 @@ class _AuthorizedGroupPageScreenState
|
|||||||
List<_GroupPageTab> get _tabs => [
|
List<_GroupPageTab> get _tabs => [
|
||||||
// Posts list
|
// Posts list
|
||||||
_GroupPageTab(
|
_GroupPageTab(
|
||||||
widget: GroupPostsSection(group: _group),
|
widget: (c) => GroupPostsSection(group: _group),
|
||||||
label: tr("Posts"),
|
label: tr("Posts"),
|
||||||
),
|
),
|
||||||
|
|
||||||
// About the group
|
// About the group
|
||||||
_GroupPageTab(
|
_GroupPageTab(
|
||||||
widget: AboutGroupSection(group: _group),
|
widget: (c) => AboutGroupSection(group: _group),
|
||||||
label: tr("About"),
|
label: tr("About"),
|
||||||
)
|
)
|
||||||
]..addAll(_group.isAtLeastModerator
|
]..addAll(_group.isAtLeastModerator
|
||||||
? [
|
? [
|
||||||
_GroupPageTab(
|
_GroupPageTab(
|
||||||
widget: GroupMembersSection(groupID: _group.id),
|
widget: (c) => GroupMembersSection(groupID: _group.id),
|
||||||
label: tr("Members"),
|
label: tr("Members"),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -91,7 +91,7 @@ class _AuthorizedGroupPageScreenState
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildGroupPageHeader(),
|
_buildGroupPageHeader(),
|
||||||
Container(
|
Material(
|
||||||
color: _headerColor,
|
color: _headerColor,
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
tabs: _tabs.map((e) => e.tab).toList(),
|
tabs: _tabs.map((e) => e.tab).toList(),
|
||||||
@ -101,7 +101,7 @@ class _AuthorizedGroupPageScreenState
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
controller: _tabController,
|
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 {
|
class _GroupPageTab {
|
||||||
final Widget widget;
|
final WidgetBuilder widget;
|
||||||
final String label;
|
final String label;
|
||||||
|
|
||||||
const _GroupPageTab({
|
const _GroupPageTab({
|
||||||
|
Loading…
Reference in New Issue
Block a user