alibaba / alibaba/flutter_boost

不能通过 getPageInfoByContext 获取当前的页面信息

Open
#1,620 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

```
var topPageInfo = BoostNavigator.instance.getTopPageInfo();
var getPageInfo = BoostNavigator.instance.getPageInfoByContext(myContext!);
'topPageInfo = ${topPageInfo?.pageName}, getPageInfo = ${getPageInfo?.pageName}'.printLog(Level.error);

/// topPageInfo = /flutter/retrievePasswordPage, getPageInfo = /flutter/loginPage
```
在栈顶页面通过context获取页面信息 获取的是 initialRoute 的信息内容

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported snippet with BoostNavigator.instance.getTopPageInfo() and getPageInfoByContext(myContext!), then trace both entry points to compare how they determine the current route. Done means getPageInfoByContext returns the current top page, /flutter/retrievePasswordPage, rather than the initialRoute login page.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.