New initial route every time when Flutter controller is initialized with pre-warmed flutter engine

543 Views Asked by At

We are building native ios applications that has embedded Flutter screens in it. So far, we have been initializing Flutter controller every time with new engine, because we need to set different route whenever new Flutter controller is instantiated.

As we want to improve performance and not to run new Flutter engine for every new controller, is there a way to use pre-warmed engine and instantiate Flutter controllers with it but to set different route every when new controller is created.

We followed guidelines for 1.22 version of engine from link, but none of the options worked for us.

If we instantiate controller with pre-warmed engine and use pushRoute on controller, first time screen is opened correctly but on the second opening black screen is presented. I understand that this is linked to cached routes of flutter engine, so maybe the right question is can cashed routes be cleared.

0

There are 0 best solutions below