public interface SplashScreen
|Modifier and Type||Method and Description|
Returns whatever state is necessary to restore a splash
Invoked by Flutter when Flutter has rendered its first frame, and would like the
Viewto be displayed as a splash screen before Flutter renders its first frame.
This method can be called at any time, and may be called multiple times depending on Android configuration changes that require recreation of a view hierarchy. Implementers that provide a stateful splash view, such as one with animations, should take care to migrate that animation state from the previously returned splash view to the newly created splash view.
onTransitionComplete callback must be invoked when
View has finished transitioning itself away. The splash
View will be removed and destroyed when the callback is invoked.
default boolean doesSplashViewRememberItsTransition()
trueif the splash
Viewbuilt by this
SplashScreenremembers its transition progress across configuration changes by saving that progress to
The typical return value for this method is
false. When the return value is
false, the following can happen:
Viewbegins transitioning to the Flutter UI.
Activityis re-created, along with the
true from this method will cause the given splash
View to be
displayed in the
View hierarchy, even if Flutter has already rendered its first
frame. It is then the responsibility of the splash
View to remember its previous
transition progress, restart any animations, and then trigger its completion callback
when appropriate. It is also the responsibility of the splash
View to immediately
invoke the completion callback if it has already completed its transition. By meeting
these requirements, and returning
true from this method, the splash screen
experience will be completely seamless, including configuration changes.