From 9d13aa13e263fda5902ca9019d6b3ee0b1859c62 Mon Sep 17 00:00:00 2001 From: tao Date: Fri, 29 Aug 2025 17:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- lib/layout/layout_page.dart | 12 ++++++++---- lib/page/profile/edit/my_edit_page.dart | 2 +- lib/page/profile/my/my_page.dart | 7 +++++-- lib/page/system/login/login_page.dart | 2 +- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e3773d4..fa4cdb6 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -52,7 +52,7 @@ { final PageController _pageController = PageController(initialPage: 0); int get currentPage { - if (!_pageController.hasClients) return 1; // 没 attach 直接 0 - return _pageController.page?.round() ?? 1; + if (!_pageController.hasClients) return 0; // 没 attach 直接 0 + return _pageController.page?.round() ?? 0; } //TabBar列表 @@ -29,9 +29,13 @@ class _LayoutPageState extends State { icon: RemixIcons.home_2_line, page: HomePage(), ), - PageItem(name: "record", icon: RemixIcons.history_line, page: RecordListPage()), PageItem( - name: "Home", + name: "Record", + icon: RemixIcons.history_line, + page: RecordListPage(), + ), + PageItem( + name: "My", icon: RemixIcons.book_open_line, page: MyPage(), ), diff --git a/lib/page/profile/edit/my_edit_page.dart b/lib/page/profile/edit/my_edit_page.dart index 9584a98..f12ddfc 100644 --- a/lib/page/profile/edit/my_edit_page.dart +++ b/lib/page/profile/edit/my_edit_page.dart @@ -83,7 +83,7 @@ class _MyEditPageState extends State { ); await updateProfileApi(selectionState.userProfile); EasyLoading.dismiss(); - context.pop(); + context.pop(true); } @override diff --git a/lib/page/profile/my/my_page.dart b/lib/page/profile/my/my_page.dart index 4333206..e6abf10 100644 --- a/lib/page/profile/my/my_page.dart +++ b/lib/page/profile/my/my_page.dart @@ -35,8 +35,10 @@ class _MyPageState extends State with AutomaticKeepAliveClientMixin { } void _goEdit() async { - await context.push(RoutePaths.myEdit, extra: _userProfile); - _init(); + var isUpload = await context.push(RoutePaths.myEdit, extra: _userProfile); + if (isUpload == true) { + _init(); + } } void _showEditProfile() { @@ -68,6 +70,7 @@ class _MyPageState extends State with AutomaticKeepAliveClientMixin { @override Widget build(BuildContext context) { + super.build(context); return SafeArea( child: ListView( padding: EdgeInsets.all(15), diff --git a/lib/page/system/login/login_page.dart b/lib/page/system/login/login_page.dart index ff9f9ba..9c6a735 100644 --- a/lib/page/system/login/login_page.dart +++ b/lib/page/system/login/login_page.dart @@ -214,7 +214,7 @@ class _LoginPageState extends State { left: 20, right: 20, ), - child: Column( + child: ListView( children: [ LogoBox(), PageHeader(),