md阅读器+

This commit is contained in:
DelLevin-Home
2026-05-22 15:27:39 +08:00
parent 6b5488aff8
commit 79f813c463
11 changed files with 1879 additions and 1414 deletions

View File

@@ -36,13 +36,16 @@ class _HomePageState extends State<HomePage> {
builder: (context, provider, child) {
final currentPage = provider.bottomNavIndex == 0 ? 0 : 1;
if (_pageController.hasClients && _pageController.page?.round() != currentPage) {
_isSwitchingPage = true;
_pageController.jumpToPage(currentPage);
// 切换完成后重置标记,确保导航栏显示
Future.delayed(const Duration(milliseconds: 300), () {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
_isSwitchingPage = false;
provider.setBottomNavVisible(true);
_isSwitchingPage = true;
_pageController.jumpToPage(currentPage);
Future.delayed(const Duration(milliseconds: 300), () {
if (mounted) {
_isSwitchingPage = false;
provider.setBottomNavVisible(true);
}
});
}
});
}