flutter / website

Flutter documentation web site
https://docs.flutter.dev
Other
2.8k stars 3.21k forks source link

Add macOS implementation of 'Adding a splash screen to your mobile app' #8275

Open jonmountjoy opened 1 year ago

jonmountjoy commented 1 year ago

Page URL

https://docs.flutter.dev/development/ui/advanced/splash-screen/

Page source

https://github.com/flutter/website/tree/main/src/development/ui/advanced/splash-screen.md

Describe the problem

This page needs information on how to customise the splash screen on MacOS.

It also mistakingly says "For more information on implementing splash screens on web and desktop platforms, see the Customizing web app initialization guide." - the referenced item only includes web splash screen customisation, not desktop platforms. So it should read: "For more information on implementing splash screens on web, see the ...."

Expected fix

This page should document how to customise the MacOS splash screen (alongside the existing iOS and Android). This page should be renamed to "Adding a splash screen to your app"

Additional context

No response

exaby73 commented 1 year ago

Hello @jonmountjoy. I can see that instructions for adding a Splash screen for desktop platforms are missing. Labeling the issue for further insights from the team. Thank you

atsansone commented 1 year ago

@cbracken : Can we create splash screens for desktop apps?

cbracken commented 1 year ago

This is related to https://github.com/flutter/flutter/issues/55427. We've added the ability to wire up a callback when the first frame of your Flutter app is ready to present, so the way you'd wire in a splash screen is:

Windows currently has all the support you need to be able to add a splash screen to your app. This was landed in https://github.com/flutter/flutter/pull/109816. macOS and Linux still need to be implemented.

I plan to look at adding this for macOS, but it's lower priority than a bunch of other items on my plate at the moment. I'll see if I can find time when I need a break from platformviews for an hour or two :)

cbracken commented 1 year ago

@atsansone I'll see if I can dig up an example that wires this up for windows, and if so, write up a short summary of the steps involved.