Flutter start page erase black and white

Article Directory


Any app will design a basic start page, today we take a look at how to set your startup page flutter project.
I started the first idea is to start page as a Widget, the Widget to load and then display our main page, but encountered a big problem in practice the process, app will start when there was a long black and white, it is clear that in the android phone, but the longer the worse the performance, ios relatively better. Done native android development android native also know that there are black and white issues, but more significantly flutter, how to solve this problem? In fact, when we create flutter project, the system has helped us to solve, but we did not notice it.

Android start page

First, open the file as shown below:
Here Insert Picture Description
has this to say
Here Insert Picture Description
meta-data in value to true representatives start page, and then open the res-> values-> style.xml file as shown below:
Here Insert Picture Description
file set up style, name LaunchTheme, pay attention to this name can not be modified, style load is drawable in launch_background.xml, we open the file:
Here Insert Picture Description

By default, there is no red box item, this is the picture we want to set the start page, the picture of our launch page stored in the drawable, as shown below:
Here Insert Picture Description
here android start page is set up is complete.

IOS

Open the following directory:
Here Insert Picture Description
will replace LaunchImage.png, LaunchImage @ 2x.png, LaunchImage @ 3x.png for our own start page pictures can be.

Flutter series

Published 113 original articles · won praise 66 · Views 300,000 +

Guess you like

Origin blog.csdn.net/mengks1987/article/details/95203858