Closed Aoi-hosizora closed 4 years ago
You are using a custom CustomTabsAnimation with none existing animations. Both 'slide_down' and 'slide_up' miss the 'android:anim/' prefix. You probably took the format from the default CustomTabsAnimation.slideIn() which actually has them wrongly defined. This is a fault in the flutter_custom_tabs package.
https://github.com/droibit/flutter_custom_tabs/issues/21
You can fix it simply by replacing
animation: CustomTabsAnimation(
startEnter: 'slide_up',
startExit: 'android:anim/fade_out',
endEnter: 'android:anim/fade_in',
endExit: 'slide_down',
),
with
animation: const CustomTabsAnimation(
startEnter: 'android:anim/slide_up',
startExit: 'android:anim/slide_out_left',
endEnter: 'android:anim/slide_in_left',
endExit: 'android:anim/slide_down',
),
You can use const (a constant) because you already know the animation names. If this doesn't work then the slide_up and slide_down don't exist and you should add them yourself as an .xml: https://stackoverflow.com/questions/23925907/slidedown-and-slideup-layout-with-animation
I'm also facing this problem, only in release mode after I updated my flutter version to latest Stable version. Previously I was using 1.9.1 and it works well. Now debug mode works normally as well.
Thx. I will try it later. Now I'm using flutter_web_browser. (Sorry for late reply)
@zanecidan I'm facing with it today, same here! After upgrade to the last stable version of Flutter, I have this problem. I already tried to change the CustomTabsAnimation() but nothing working here. Did you find a solution?
@joaoarmando In the end I open the plugin files and fixed the animation parameters as per @Fleximex suggested.
I use flutter_custom_tabs 0.6.0 on android emulate and my mobile phone.
In emulate (Android 8) it works well (although the system is not support browser exactly). But in my own mobile phone (Android 10), a single
launch()
action has no effect. If I invokelaunch()
twice, the last action has no effect also, but after I press the back button, the first page will be shown (navigator changed only when pressed back button).There is my code: (nearly is same with demo)