From 2540ed396f54e469cc0bc2b058b991f7a187eaf2 Mon Sep 17 00:00:00 2001 From: gix Date: Mon, 23 Nov 2020 17:00:31 +0800 Subject: [PATCH] feat: add custom transition animation support --- lib/src/route/native_bridge.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/src/route/native_bridge.dart b/lib/src/route/native_bridge.dart index cb365d7..3c0b14b 100644 --- a/lib/src/route/native_bridge.dart +++ b/lib/src/route/native_bridge.dart @@ -25,6 +25,23 @@ Color _defaultBackgroundColor(BuildContext context) { : CupertinoColors.black; } +/// +/// backgroundColorProvider +/// +/// 如果当前页面不为透明背景,默认为根据系统是否黑暗模式默认为 黑/白 +/// +/// transitionBuilderProvider +/// +/// 页面切换动画,默认返回null 使用native系统默认动画即可,在一下几种场景中需要手动自定义 +/// +/// +/// android +/// +/// fragment 切换 +/// activity的launch mode 不为 standard 的情况 +/// +/// ios +/// addChild 或者是 禁用了系统默认动画的情况 class FaradayNativeBridge extends StatefulWidget { final RouteFactory onGenerateRoute; final RouteFactory onUnknownRoute;