Commit d2f628fe authored by justin's avatar justin

Pick form v1.17.1-ali_hotfixes

parent ca458344
## 1.12.13+2
Fixed bugs
## 1.12.13
Supported Flutter sdk 1.12.13
## 1.9.1+2
Rename the version number and start supporting androidx by default, Based on the flutter 1.9.1 - hotfixs。
fixed bugs
## 0.1.66 ## 0.1.66
Fixed bugs Fixed bugs
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
# Release Note # Release Note
Please checkout the release note for the latest 0.1.64 to see changes [0.1.64 release note](https://github.com/alibaba/flutter_boost/releases) Please checkout the release note for the latest 1.12.13+1 to see changes [1.12.13+1 release note](https://github.com/alibaba/flutter_boost/releases)
# FlutterBoost # FlutterBoost
A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts.The philosophy of FlutterBoost is to use Flutter as easy as using a WebView. Managing Native pages and Flutter pages at the same time is non-trivial in an existing App. FlutterBoost takes care of page resolution for you. The only thing you need to care about is the name of the page(usually could be an URL).  A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts.The philosophy of FlutterBoost is to use Flutter as easy as using a WebView. Managing Native pages and Flutter pages at the same time is non-trivial in an existing App. FlutterBoost takes care of page resolution for you. The only thing you need to care about is the name of the page(usually could be an URL). 
<a name="bf647454"></a> <a name="bf647454"></a>
# Prerequisites # Prerequisites
You need to add Flutter to your project before moving on.The version of the flutter SDK requires v1.9.1+hotfixes, or it will compile error. You need to add Flutter to your project before moving on.The version of the flutter SDK requires to match boost's version, or it will compile error.
...@@ -22,22 +22,19 @@ You need to add Flutter to your project before moving on.The version of the flut ...@@ -22,22 +22,19 @@ You need to add Flutter to your project before moving on.The version of the flut
| Flutter Boost Version | Support Flutter SDK Version | Description | Support AndroidX? | | Flutter Boost Version | Support Flutter SDK Version | Description | Support AndroidX? |
| --------------------- | --------------------------- | ------------------------------------------------------------ | ------------------ | | --------------------- | --------------------------- | ------------------------------------------------------------ | ------------------ |
| 0.1.50 | 1.5.4-hotfixes | android if other flutter versions or branches will compile incorrectly. | No | | 1.9.1+2 | 1.9.1-hotfixes | Rename the version number and start supporting androidx by default | Yes |
| 0.1.51-0.1.59 | 1.5.4-hotfixes | bugfix for 0.1.50. | No | | 1.12.13+1 | 1.12.13-hotfixes | supporting androidx | Yes |
| 0.1.60 | 1.9.1-hotfixes | Android does not support andriodx if other flutter branches will compile incorrectly. | No | | 1.12.13+2 | 1.12.13-hotfixes | supporting androidx | Yes |
| 0.1.61-0.1.69 | 1.9.1-hotfixes | bugfix for 0.1.60. | No |
| 0.1.63 | 1.9.1-hotfixes | If other branches will compile incorrectly. Synchronize with the 0.1.60 code, and bugfix also merge to this branch. | No |
| 1.9.1+1 | 1.9.1-hotfixes | Rename the version number and start supporting androidx by default | Yes |
| Flutter Boost branch | Support Flutter SDK Version | Description | Support AndroidX? | | Flutter Boost branch | Support Flutter SDK Version | Description | Support AndroidX? |
| --------------------- | --------------------------- | ------------------------------------------------------------ | ------------------ | | --------------------- | --------------------------- | ------------------------------------------------------------ | ------------------ |
| v1.9.1-hotfixes | 1.9.1-hotfixes | for androidx | Yes | | v1.9.1-hotfixes | 1.9.1-hotfixes | for androidx | Yes |
| task/task_v1.9.1_support_hotfixes| 1.9.1-hotfixes | for support | NO |
| v1.12.13-hotfixes | 1.12.13-hotfixes | for androidx | Yes | | v1.12.13-hotfixes | 1.12.13-hotfixes | for androidx | Yes |
| task/task_v1.12.13_support_hotfixes| 1.12.13-hotfixes | for support | NO | | v1.17.1-hotfixes | 1.17.1 | for androidx | Yes |
# Getting Started # Getting Started
...@@ -51,21 +48,18 @@ androidx branch ...@@ -51,21 +48,18 @@ androidx branch
flutter_boost: flutter_boost:
git: git:
url: 'https://github.com/alibaba/flutter_boost.git' url: 'https://github.com/alibaba/flutter_boost.git'
ref: ' 1.9.1+1' ref: '1.12.13+2'
```
support branch
```json
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: 'task/task_v1.9.1_support_hotfixes'
``` ```
# Boost Integration # Boost Integration
Please see the boost example for details. Please see
1. Boost detail example
2. integrated document <a href="INTEGRATION.md">Integration </a>
# FAQ # FAQ
please read this document: please read this document:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Release Note # Release Note
请查看最新版本0.1.64的release note 确认变更,[0.1.64 release note](https://github.com/alibaba/flutter_boost/releases) 请查看最新版本1.12.13+1的release note 确认变更,[1.12.13+1 release note](https://github.com/alibaba/flutter_boost/releases)
# FlutterBoost # FlutterBoost
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# 前置条件 # 前置条件
在继续之前,您需要将Flutter集成到你现有的项目中。flutter sdk 的版本需要 v1.9.1-hotfixes,否则会编译失败. 在继续之前,您需要将Flutter集成到你现有的项目中。flutter sdk 的版本需要和boost版本适配,否则会编译失败.
# FAQ # FAQ
请阅读这篇文章: 请阅读这篇文章:
...@@ -24,23 +24,20 @@ ...@@ -24,23 +24,20 @@
| Flutter Boost 版本 | 支持的 Flutter SDK 版本 | Description | 是否支持 AndroidX? | | Flutter Boost 版本 | 支持的 Flutter SDK 版本 | Description | 是否支持 AndroidX? |
| ----------------------- | ----------------------- | ------------------------------------------------------------ | ------------------- | | ----------------------- | ----------------------- | ------------------------------------------------------------ | ------------------- |
| 0.1.50 | 1.5.4-hotfixes | android 如果其他 flutter 版本或者分支会编译错误。 | No | | 1.9.1+2 | 1.9.1-hotfixes | 版本号重新命名,开始默认支持androidx | Yes |
| 0.1.51-0.1.59 | 1.5.4-hotfixes | 0.1.50 的 bugfix。 | No | | 1.12.13+1 | 1.12.13 -hotfixes | 支持androidx | Yes |
| 0.1.60 | 1.9.1-hotfixes | android 如果其他 flutter 分支会编译错误。 | No | | 1.12.13+2 | 1.17.1-hotfixes | 支持androidx | Yes |
| 0.1.63 | 1.9.1-hotfixes | 和 0.1.60 代码同步, bugfix 也会合入该分支,如果其他分支会编译错误。 | No |
| 0.1.61-0.1.69 | 1.9.1-hotfixes | 0.1.60 的 bugfix。 | No |
| 1.9.1+1 | 1.9.1-hotfixes | 版本号重新命名,开始默认支持androidx | Yes |
| Flutter Boost 分支 | 支持的 Flutter SDK 版本 | Description | 是否支持 AndroidX? |
| v1.9.1-hotfixes | 1.9.1-hotfixes | 支持androidx,修复bug后会定期发布新版本 | Yes | | Flutter Boost 分支 | 支持的 Flutter SDK 版本 | Description | 是否支持 AndroidX? |
| task/task_v1.9.1_support_hotfixes| 1.9.1-hotfixes | 支持support包,不支持androidx | NO | | --------------------- | --------------------------- | ------------------------------------------------------------ | ------------------ |
| v1.12.13-hotfixes | 1.12.13-hotfixes | 支持androidx,目前还没发布的版本,用分支形式引入 | Yes | | v1.9.1-hotfixes | 1.9.1-hotfixes | for androidx | Yes |
| task/task_v1.12.13_support_hotfixes| 1.12.13-hotfixes | 支持support包,不支持androidx | NO | | v1.12.13-hotfixes | 1.12.13-hotfixes | for androidx | Yes |
| v1.17.1-hotfixes | 1.17.1 | for androidx | Yes |
.
# 安装 # 安装
...@@ -53,21 +50,17 @@ androidx branch ...@@ -53,21 +50,17 @@ androidx branch
flutter_boost: flutter_boost:
git: git:
url: 'https://github.com/alibaba/flutter_boost.git' url: 'https://github.com/alibaba/flutter_boost.git'
ref: ' 1.9.1+1' ref: '1.12.13+2'
```
support branch
```json
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: 'task/task_v1.9.1_support_hotfixes'
``` ```
## boost集成 ## boost集成
集成请看boost的Examples 集成请看:
1. boost的Examples
2. 集成文档 <a href="INTEGRATION.md">Integration </a>
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
- (void)resume - (void)resume
{ {
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"]; if([UIApplication sharedApplication].applicationState == UIApplicationStateActive){
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"];
}
} }
- (void)inactive - (void)inactive
......
...@@ -271,8 +271,13 @@ static NSUInteger kInstanceCounter = 0; ...@@ -271,8 +271,13 @@ static NSUInteger kInstanceCounter = 0;
pageName:_name pageName:_name
params:_params params:_params
uniqueId:self.uniqueIDString]; uniqueId:self.uniqueIDString];
//NOTES:务必在show之后再update,否则有闪烁; 或导致侧滑返回时上一个页面会和top页面内容一样 //根据淘宝特价版日志证明,即使在UIViewController的viewDidAppear下,application也可能在inactive模式,此时如果提交渲染会导致GPU后台渲染而crash
[self surfaceUpdated:YES]; //参考:https://github.com/flutter/flutter/issues/57973
//https://github.com/flutter/engine/pull/18742
if([UIApplication sharedApplication].applicationState == UIApplicationStateActive){
//NOTES:务必在show之后再update,否则有闪烁; 或导致侧滑返回时上一个页面会和top页面内容一样
[self surfaceUpdated:YES];
}
[super viewDidAppear:animated]; [super viewDidAppear:animated];
......
...@@ -65,18 +65,23 @@ class FlutterBoost { ...@@ -65,18 +65,23 @@ class FlutterBoost {
static void onPageStart() { static void onPageStart() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
singleton.channel.invokeMethod<Map>('pageOnStart').then((Map pageInfo) { singleton.channel
if (pageInfo == null || pageInfo.isEmpty) return; .invokeMethod<Map<dynamic, dynamic>>('pageOnStart')
.then((Map<dynamic, dynamic> pageInfo) {
if (pageInfo.containsKey("name") && if (pageInfo == null || pageInfo.isEmpty) {
pageInfo.containsKey("params") && return;
pageInfo.containsKey("uniqueId")) { }
if (pageInfo.containsKey('name') &&
pageInfo.containsKey('params') &&
pageInfo.containsKey('uniqueId')) {
ContainerCoordinator.singleton.nativeContainerDidShow( ContainerCoordinator.singleton.nativeContainerDidShow(
pageInfo["name"], pageInfo["params"], pageInfo["uniqueId"]); pageInfo['name'] as String,
(pageInfo['params'] as Map<dynamic, dynamic>)
.cast<String, dynamic>(),
pageInfo['uniqueId'] as String);
} }
}); });
} });
);
} }
static TransitionBuilder init({TransitionBuilder builder, static TransitionBuilder init({TransitionBuilder builder,
......
name: flutter_boost name: flutter_boost
description: A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts. description: A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts.
version: 1.9.1+1 version: 1.12.13+2
author: Alibaba Xianyu author: Alibaba Xianyu
homepage: https://github.com/alibaba/flutter_boost homepage: https://github.com/alibaba/flutter_boost
...@@ -17,42 +17,7 @@ dev_dependencies: ...@@ -17,42 +17,7 @@ dev_dependencies:
sdk: flutter sdk: flutter
mockito: 4.1.1 mockito: 4.1.1
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter: flutter:
plugin: plugin:
androidPackage: com.idlefish.flutterboost androidPackage: com.idlefish.flutterboost
pluginClass: FlutterBoostPlugin pluginClass: FlutterBoostPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.io/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.io/custom-fonts/#from-packages
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment