优化bug

This commit is contained in:
tao
2025-08-29 17:53:05 +08:00
parent 8d7038b713
commit 9d13aa13e2
5 changed files with 16 additions and 9 deletions

View File

@@ -52,7 +52,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"

View File

@@ -18,8 +18,8 @@ class _LayoutPageState extends State<LayoutPage> {
final PageController _pageController = PageController(initialPage: 0); final PageController _pageController = PageController(initialPage: 0);
int get currentPage { int get currentPage {
if (!_pageController.hasClients) return 1; // 没 attach 直接 0 if (!_pageController.hasClients) return 0; // 没 attach 直接 0
return _pageController.page?.round() ?? 1; return _pageController.page?.round() ?? 0;
} }
//TabBar列表 //TabBar列表
@@ -29,9 +29,13 @@ class _LayoutPageState extends State<LayoutPage> {
icon: RemixIcons.home_2_line, icon: RemixIcons.home_2_line,
page: HomePage(), page: HomePage(),
), ),
PageItem(name: "record", icon: RemixIcons.history_line, page: RecordListPage()),
PageItem( PageItem(
name: "Home", name: "Record",
icon: RemixIcons.history_line,
page: RecordListPage(),
),
PageItem(
name: "My",
icon: RemixIcons.book_open_line, icon: RemixIcons.book_open_line,
page: MyPage(), page: MyPage(),
), ),

View File

@@ -83,7 +83,7 @@ class _MyEditPageState extends State<MyEditPage> {
); );
await updateProfileApi(selectionState.userProfile); await updateProfileApi(selectionState.userProfile);
EasyLoading.dismiss(); EasyLoading.dismiss();
context.pop(); context.pop(true);
} }
@override @override

View File

@@ -35,8 +35,10 @@ class _MyPageState extends State<MyPage> with AutomaticKeepAliveClientMixin {
} }
void _goEdit() async { void _goEdit() async {
await context.push(RoutePaths.myEdit, extra: _userProfile); var isUpload = await context.push(RoutePaths.myEdit, extra: _userProfile);
_init(); if (isUpload == true) {
_init();
}
} }
void _showEditProfile() { void _showEditProfile() {
@@ -68,6 +70,7 @@ class _MyPageState extends State<MyPage> with AutomaticKeepAliveClientMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context);
return SafeArea( return SafeArea(
child: ListView( child: ListView(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),

View File

@@ -214,7 +214,7 @@ class _LoginPageState extends State<LoginPage> {
left: 20, left: 20,
right: 20, right: 20,
), ),
child: Column( child: ListView(
children: [ children: [
LogoBox(), LogoBox(),
PageHeader(), PageHeader(),