Skip to content

Commit f34f24a

Browse files
committed
style: center-align tabs in wide landscape view on home page
1 parent 927c689 commit f34f24a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/pages/home/home_page.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import '../../pages/home/app/app_list_page.dart';
77
import '../../pages/home/feed/home_feed_page.dart';
88
import '../../pages/home/return_top_controller.dart';
99
import '../../pages/home/topic/home_topic_page.dart';
10+
import '../../utils/utils.dart';
1011

1112
// ignore: constant_identifier_names
1213
enum TabType { FOLLOW, APP, FEED, HOT, TOPIC, PRODUCT, COOLPIC, NONE }
@@ -87,6 +88,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
8788
scrollToTop(index);
8889
}
8990
},
91+
tabAlignment: Utils.isWideLandscape(context)
92+
? TabAlignment.center
93+
: TabAlignment.startOffset,
9094
),
9195
actions: [
9296
IconButton(

0 commit comments

Comments
 (0)