在 StackNavigator 中更改特定屏幕的动画方向?

Changing the direction of the animation for a particular screen in StackNavigator?

我需要为 Navigation 5.0.

中堆栈导航器中的特定屏幕将导航动画更改为 bottom-to-top

我在Whosebug 中寻找答案,但没有找到与单屏相关的解决方案。如果有人正在寻找答案,那么这里是解决方案。

options={{cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS}}

import {  CardStyleInterpolators,createStackNavigator } from "@react-navigation/stack";

<AppStack.Navigator headerMode="none" initialRouteName={"Home"}>
          <AppStack.Screen name="Home" component={HomeScreen} />
          <AppStack.Screen
            options={{
              cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
            }}
            name="Edit"
            component={EditScreen}
          />
          <AppStack.Screen name="Settings" component={SettingScreen} />
        </>
      )}
</AppStack.Navigator>