alibaba / alibaba/flutter_boost

3.0版本仍旧无法 通过 GlobalKey 去获取 context

Open
#1,459 7 comments 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

之前有个issue 1367

版本:v1.22.4-hotfixes
child: MaterialApp(
navigatorKey: navigatorKey,
theme: provider.getTheme(),
darkTheme: provider.getTheme(isDarkMode: true),
themeMode: provider.getThemeMode(),
home: AccountUtils.isLogin() ? HomePage() : LoginPage(),
onGenerateRoute: Application.router.generator,
builder: FlutterBoost.init(postPush: _onRoutePushed),
),
无法通过navigatorKey.currentState.overlay.context 获取context,注释掉FlutterBoost.init()正常

本以为高版本已经解决,但是发现3.0版本还是无法通过navigatorKey.currentState.overlay.context 获取context

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported MaterialApp configuration with navigatorKey.currentState.overlay.context and FlutterBoost.init(postPush: _onRoutePushed), comparing it with FlutterBoost.init() commented out. Review issue 1367 and determine whether the context lookup should work in version 3.0; done means the expected context is retrievable or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, ios
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.