alibaba / alibaba/flutter_boost

Android 微信里的H5页面先后打开两个Flutter 先打开的页面在上面 后打开的页面在下面

Open
#942 0 comments 0 reactions 0 assignees View on GitHub
Android
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

## Steps to Reproduce
**前提:微信打开的 H5 页面可以同时打开 App 内两个 Flutter 页面,是通过微信 SDK 的方式打开,不是通过 schema 的方式**

1. 在微信里打开一个 H5 页面,打开 App 的一个 flutter 页面
2. 切换到后台,再到 H5 页面打开另一个 flutter 页面

期望是打开的 flutter 遵循栈的操作顺序;实际是先打开的页面在上面,后打开的在下面

通过日志看出打开后一个页面时 创建了一个 Native 容器,前一个 flutter 页面的容器又走了一次

猜想:微信里面打开 App 是通过 WXEntryActivity 的回调打开的,这个回调会在上一个 Native 容器的 onResume 之前调用导致的

有没有比较优雅的解决办法防止这种情况?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the WXEntryActivity callback and the native-container lifecycle around onResume, using the reported logs from opening two Flutter pages through WeChat H5. Done means the pages follow opening-stack order, with the later page above the earlier one and no incorrect repeated container handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.