How can I run the integration test for existing native app with embedded Flutter view by using appium?

I’ve my application with embedded flutter views and the tests are written in java(appium). I want to add tests for the flutter views but it says that it needs capability “automationName” set to “Flutter”. But my “automationName” capability is set to “UiAutomator2”. Is there a way to dynamically change the capability to Flutter when my application reaches the flutter views ?

Any news or other sources for some informations how to automate a native app with appium which contains some flutter views ?