Closed dayoul closed 2 years ago
If you remove the FlutterNativeSplash.remove()
, does the splash screen still get removed? I think your runApp
call is going to trigger a bunch of async code, so it may be that it looks like the splash screen is removed before runApp
but it is really just the delay of the async code that makes it appear that way. I expect you might have better results if you run the FlutterNativeSplash.remove()
somewhere inside runApp
after you have loaded the resources your app depends upon. Just a guess, though.
I've found a workaround for this. As I'm creating new FlutterViewController
(not using default one), I had to register the splash screen to FlutterViewController().splashScreenView
. So the code looks like this.
class MainFlutterViewController: FlutterViewController {
required init(coder aDecoder: NSCoder) {
...
let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
let aVC = storyboard.instantiateViewController(withIdentifier: "LaunchScreenViewController") as? UIViewController
splashScreenView = aVC!.view
}
}
Closing the issue. Thanks for the response(@jonbhanson) by the way.
Hi! Still have this issue with default iOS flutter app. Package version 2.2.16. @jonbhanson I move remove
before and after runApp
but result is the same.
@sherazipet please open a new ticket and supply the full details requested in the ticket template.
version - 2.2.8 platform - iOS
Hi. First of all, thank you for the wonderful package. Everything works fine except for the situation in iOS, when using
FlutterEngine
fromFlutterEngineGroup
. My initial ViewController is like below.At first, splash screen appears, but when my
main()
function in dart gets called(probably when my mainEngine starts running), splash screen disappears and shows black empty screen for a moment beforerunApp()
.Below is my main.dart code.
Any idea for this?. Thanks in advance.