alibaba / alibaba/flutter_boost

[featurePR]使FlutterBoost支持沉浸式状态栏各页面设置状态共享,保持和dart层一致的功能

Open
#1,706 3 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

**Old logic:**
1、flutterA进入flutterB的activity,B销毁了A的platformPlugin
2、从B返回A,这个时候A页面检测到platformPlugin为空,重新创建platformPlugin【状态栏主题为初态,丢失之前的设置】;
3、A页面在onResume调用this.platformPlugin.updateSystemUiOverlays(),导致状态栏颜色重置

**New logic:**
1、定制FlutterBoostPlatformPlugin,destroy的时候保存状态栏状态【currentTheme和enabledOverlays】
2、创建FlutterBoostPlatformPlugin的时候进行currentTheme和enabledOverlays的恢复,保证状态栏沉浸式状态始终与dart保持同步

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the FlutterBoostPlatformPlugin lifecycle, especially destroy, creation, onResume, and updateSystemUiOverlays(). Trace how currentTheme and enabledOverlays are handled across plugin recreation. Done means the saved status-bar state is restored on creation and remains synchronized with the Dart layer when returning between pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.