Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter create should make an app with a non-white splash screen #8147

Closed
collinjackson opened this issue Feb 14, 2017 · 17 comments · Fixed by #11505
Closed

flutter create should make an app with a non-white splash screen #8147

collinjackson opened this issue Feb 14, 2017 · 17 comments · Fixed by #11505
Assignees
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects

Comments

@collinjackson
Copy link
Contributor

collinjackson commented Feb 14, 2017

(based on @xster's proposal in #8127)

When running flutter create, the default launch storyboard is white. Devs will likely want to show a custom screen while the app is loading. Consider putting a placeholder splash screen in the template app, so devs can just drop in new assets and be done with it.

Here are some resources that discuss configuring splash screens.

iOS: https://docs.nativescript.org/publishing/creating-launch-screens-ios

Android: https://www.bignerdranch.com/blog/splash-screens-the-right-way/

@xster xster added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 14, 2017
@xster
Copy link
Member

xster commented Feb 14, 2017

I would amend that if possible, it would be great to not encourage users to dive into the /android and /ios folders manually at all and just generate this automatically from some .yaml in flutter space.

@abarth
Copy link
Contributor

abarth commented Feb 14, 2017

Developers are going to need to dive into the android and ios folders to complete their apps. For example, they'll need to do that to configure launcher icons. I think it's reasonable for the default project template to have an example splash screen (much like we provide an example launcher icon), but I don't think we add much value by intermediating the splash screen.

@Hixie
Copy link
Contributor

Hixie commented Feb 28, 2017

How does this differ from #8127 ?

@Hixie Hixie added this to the 2: Make Early Adopters happy milestone Feb 28, 2017
@collinjackson
Copy link
Contributor Author

This bug is about having a default iOS splash screen that isn't white (e.g. Flutter logo)

#8127 is about removing the black flicker between the splash screen and the main app being rendered.

@eseidelGoogle eseidelGoogle added this to Backlog in M2 Mar 21, 2017
@eseidelGoogle
Copy link
Contributor

@xster mentioned interest in this.

@eseidelGoogle eseidelGoogle modified the milestones: 3: Make conferences happy, 2: Make Early Adopters happy Apr 11, 2017
@eseidelGoogle
Copy link
Contributor

Speculatively moving to M3.

@eseidelGoogle
Copy link
Contributor

The reason to consider this for M2 is to make the presentations better during Flutter talks at I/O.

@eseidelGoogle eseidelGoogle removed this from General Backlog in M2 Apr 11, 2017
@eseidelGoogle
Copy link
Contributor

@xster you were working in this area recently, curious if this status has changed?

@xster
Copy link
Member

xster commented Aug 3, 2017

I didn't have plans but it's fairly easy. I can put something together.

@xster xster self-assigned this Aug 3, 2017
@xster xster added this to In-Progress O(days) in xster tasks Aug 3, 2017
@xster
Copy link
Member

xster commented Aug 3, 2017

It's a little awkward. I made #11505 but because the previous main Android activity theme was just always black, adding a splash screen re-introduces the Android version of #8127. So I'd have to make an Android version of flutter/engine#3923 in the engine before I submit this too.

@valterh4ck3r
Copy link

It's done ?

@arjun1194
Copy link

How do i load an API while Splash Screen is showing in flutter?

@henriquearthur
Copy link

To avoid diving into android/ and ios/ folders and customizing the splash screens manually I have created a package that will do the modifications automatically based on a setting on pubspec.yaml.

https://pub.dev/packages/flutter_native_splash

Similar to flutter_launcher_icons, the flutter_native_splash can generate native splash screens for Android and iOS with one command.

@sathya4code
Copy link

How do i load an API while Splash Screen is showing in flutter?

Hi @arjun1194,

Did you get any solution for this. I am also want to load some data from API in default splash screen and send it to main.dart.

@arjun1194
Copy link

I don't know if this is the right approach but we ended up using a widget which opens whenever the app is started and used it as a Splash screen and did all the loading work in it

@ycv005
Copy link

ycv005 commented May 16, 2020

I don't know if this is the right approach but we ended up using a widget which opens whenever the app is started and used it as a Splash screen and did all the loading work in it

You can do it with async waiting inside initState method. For example with a Class

class _HomePageState extends State {
var apiurl = "https://www.thecocktaildb.com/api/json/v1/1/filter.php?c=Cocktail";
var res, drinks;
@OverRide
void initState() {
super.initState();
fetchData();
}

fetchData()async{
res = await http.get(apiurl);
drinks = jsonDecode(res.body)['drinks'];
print(drinks.toString());
setState(() {});
}
.....
....
....

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
No open projects
xster tasks
Done (in chronological order)
Development

Successfully merging a pull request may close this issue.

10 participants