feat: 首页,播放页,搜索页,收藏UI
This commit is contained in:
1 parent
197c3e9b88
commit
e59ac2177b
19 files changed
+475
-81
No files matched your search
@@ -23,6 +23,7 @@ class _MainRootState extends State<MainRoot> {
|
||||
MinePage(),
|
||||
];
|
||||
|
||||
final _pageController = PageController();
|
||||
final List<_TabBarItem> _items = const [
|
||||
_TabBarItem(
|
||||
selectedIcon: ConstImg.tabHomeSelected,
|
||||
@@ -52,7 +53,12 @@ class _MainRootState extends State<MainRoot> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
extendBody: true,
|
||||
body: IndexedStack(index: _currentIndex, children: _pages),
|
||||
// body: IndexedStack(index: _currentIndex, children: _pages),
|
||||
body: PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: _pageController,
|
||||
children: _pages,
|
||||
),
|
||||
bottomNavigationBar: SafeArea(
|
||||
top: false,
|
||||
minimum: EdgeInsets.only(bottom: 10.h),
|
||||
@@ -113,7 +119,7 @@ class _MainRootState extends State<MainRoot> {
|
||||
if (_currentIndex == index) {
|
||||
return;
|
||||
}
|
||||
|
||||
_pageController.jumpToPage(index);
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user