I've been struggling with too much elevated startup times. I was using AnimatedSplashScreen.withScreenFunction in order to initialize app resources, connections...
After some researching I've found that current implementation is serializing the execution of the animation and then the execution of screenFunction.
I've imported the source code into my project and I've improved startup times using Future.wait[...<futures>...].
I've been struggling with too much elevated startup times. I was using
AnimatedSplashScreen.withScreenFunction
in order to initialize app resources, connections...After some researching I've found that current implementation is serializing the execution of the animation and then the execution of
screenFunction
.I've imported the source code into my project and I've improved startup times using
Future.wait[...<futures>...]
.Please take a look of this snippet of
_AnimatedSplashScreenState
(full implementation can be found here https://gist.github.com/henry2man/0658f657f2087caac2cd579b783981d4)PS: I've also considered that "
function
" attribute is a always pure function that doesn't return any Widget, so I use always "nextScreen
" attributePS2: Also I think that a default duration of 2500 milliseconds is too much. Please consider change this to 1000ms, as per Miller, Card et al,