0

I would like to apply this gradient as a launch screen. I did it for android by setting a new drawable, but now I want to do it for iOS.

I understood that I had to edit the LaunchScreen.storyboard file at the line :

<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

I've seen on similar questions that it was not possible to run any code in this file, therefore making it impossible to have a gradient through code. So the best option would be to have the background as an image, am I right ?

If so, I haven't found any detailed explanations on how to achieve that, what would be the size of the image, where to import it...

enter image description here

user54517
  • 2,020
  • 5
  • 30
  • 47
  • Does this answer your question? [Setting gradient background color to LaunchScreen which will display a logo image at center](https://stackoverflow.com/questions/36186404/setting-gradient-background-color-to-launchscreen-which-will-display-a-logo-imag) This is not a flutter specific question. – Ben Butterworth Mar 29 '21 at 08:30
  • 1
    You are right, on iOS you can't configure launchscreen from code. You can only use prepared image in UIImageView and use scaleAcpectFill content mode to fill full screen - https://developer.apple.com/documentation/uikit/uiview/contentmode/scaleaspectfill. – Mol0ko Mar 29 '21 at 08:40
  • `I haven't found any detailed explanations on how to achieve that, what would be the size of the image, where to import it.` As I was saying earlier, the explanations found were not detailed enough. I can't use xcode's features as I am a windows user. So I have to do that through code, but I don't know where to import the image, what arguments I should give, what size the image shoud be... – user54517 Mar 29 '21 at 08:40

0 Answers0