Skip to content

Manually create and warm up the root Container #211

Closed Answered by GregoryConrad
m-sadegh-sh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi 👋

I'll preface this answer with the following (for anyone else stumbling upon this discussion in the future):

Note

Most of the time you should be using the warm up methodology defined in the docs.

That being disclosed, you explicitly said:

I prefer to do the warmup before Flutter draws its first frame, and this means the splash screen will be kept showing.

Which is a valid use-case that I hadn't thought of before.

but the only thing I'm concerned about is the lack of the Container disposal

Don't worry about it; Flutter doesn't even guarantee that deactivate/unmount will be called on app close (and thus container/other resource disposal that's managed by the widget tree). And since…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@GregoryConrad
Comment options

@m-sadegh-sh
Comment options

@m-sadegh-sh
Comment options

@GregoryConrad
Comment options

Answer selected by GregoryConrad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants