Skip to content

Commit 3ad96ad

Browse files
committed
fix(UI)
1 parent 3305312 commit 3ad96ad

2 files changed

Lines changed: 34 additions & 16 deletions

File tree

lib/modules/areas/areas_page.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,23 @@ class AreasPage extends GetView<AreasController> {
1717
scrolledUnderElevation: 0,
1818
leading: showAction ? const MenuButton() : null,
1919
actions: showAction ? [CommonAppBarActions()] : null,
20-
title: TabBar(
21-
controller: controller.tabController,
22-
isScrollable: true,
23-
tabAlignment: TabAlignment.center,
24-
labelStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
25-
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
26-
indicatorSize: TabBarIndicatorSize.label,
27-
tabs: Sites().availableSites().map((e) => Tab(text: e.name)).toList(),
20+
flexibleSpace: SafeArea(
21+
child: Align(
22+
alignment: Alignment.topCenter,
23+
child: Container(
24+
height: kToolbarHeight,
25+
alignment: Alignment.center,
26+
child: TabBar(
27+
controller: controller.tabController,
28+
isScrollable: true,
29+
tabAlignment: TabAlignment.center,
30+
labelStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
31+
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
32+
indicatorSize: TabBarIndicatorSize.label,
33+
tabs: Sites().availableSites().map((e) => Tab(text: e.name)).toList(),
34+
),
35+
),
36+
),
2837
),
2938
),
3039
body: TabBarView(

lib/modules/popular/popular_page.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@ class PopularPage extends GetView<PopularController> {
2020
scrolledUnderElevation: 0,
2121
leading: showAction ? const MenuButton() : null,
2222
actions: showAction ? [CommonAppBarActions()] : null,
23-
title: TabBar(
24-
controller: controller.tabController,
25-
isScrollable: true,
26-
tabAlignment: TabAlignment.center,
27-
labelStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
28-
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
29-
indicatorSize: TabBarIndicatorSize.label,
30-
tabs: Sites().availableSites().map((e) => Tab(text: e.name)).toList(),
23+
flexibleSpace: SafeArea(
24+
child: Align(
25+
alignment: Alignment.topCenter,
26+
child: Container(
27+
height: kToolbarHeight,
28+
alignment: Alignment.center,
29+
child: TabBar(
30+
controller: controller.tabController,
31+
isScrollable: true,
32+
tabAlignment: TabAlignment.center,
33+
labelStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
34+
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
35+
indicatorSize: TabBarIndicatorSize.label,
36+
tabs: Sites().availableSites().map((e) => Tab(text: e.name)).toList(),
37+
),
38+
),
39+
),
3140
),
3241
),
3342
body: TabBarView(

0 commit comments

Comments
 (0)