Closed johnareid54 closed 3 years ago
You mentioned Windows 10 - are you running your app on Windows, or just developing on Windows? Can you add your flutter doctor output?
I develop on Windows and use the web for testing.
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, 2.0.1, on Microsoft Windows [Version 10.0.19041.867], locale en-GB) [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [√] Chrome - develop for the web [√] Android Studio (version 4.0) [√] VS Code (version 1.54.3) [√] VS Code, 64-bit edition (version 1.53.2) [√] Connected device (2 available)
• No issues found!
Printscreen from app with splash screen
New app with code pasted in (no splash screen)
Do you have a Scaffold in your app's widget tree?
Yes I use a Scaffold, tried setting the default background in the theme but no luck.
I tried reproducing the problem, but only saw the problem when the Scaffold was missing.
Can you supply me with code so I can reproduce the problem? Either post some skeleton code that reproduces the problem, or send me something?
I stripped the app of all data and put a copy on Google Drive.
I should point out that I run the command flutter pub run flutter_native_splash:create and then delete the link in the pubspec.yaml file as I have had instances of conflicts with other entries (i.e. flutter_automation).
I sent a permission request to access the file... as soon as you approve it, I will take a look. 👍🏻
I tested the plugin on a different computer this morning and it worked fine, so I went back to the original computer and again it worked fine, so it must have been some type of blimp! It just means moving the code into the new file.
Can I just say- this plugin has been a lifesaver - without it the app was getting rejected by the Play store, put in the native screen and it passed. Not sure why the Flutter team could not incorporate your code into the flutter base system.
Glad it worked for you @johnareid54. 👍🏻
@johnareid54 I noticed in your app, your Scaffold has the parameter
backgroundColor: Colors.white54,
Colors.white54
has 54% transparency, so the background color set by the splash screen will show up. If you were looking for an off-white color, you could use Colors.grey[100]
or for precise control use Color(0xFFF5F5F5)
where the first byte is transparency and should stay FF, and the rest make up the RGB value.
Windows 10 Flutter 2.0.1
I created a new app and ran the native splash screen code accepting the default and created the default file flutter_native_splash.yaml
The splash screen created ok but on running the app, the background colour is now the same which is used in the splash screen. I have tried changing the theme data but this has no effect.