Closed ivanhercaz closed 1 year ago
Well, a bit of progress. The same configuration in a different app works on iOS:
I will try to test it in another Android device to discard if it is just a problem with my current smartphone. I will also test the another sample app I am using for Android.
You may want to try it on an Android emulator. Sometimes the Android clone operating systems do not implement their splash screens according to the Android API.
@jonbhanson, I tried just now with an Android emulator (Pixel 2 XL API 31) but it doesn't work either. Strange...
@jonbhanson, already found my error and I could confirm it was an error and not a bug! Looking on res
directory I decided to check the values-v31/styles.xml
and I saw there isn't any mention to the background color nor the icon nor the launcher theme. I edited it manually and it works.
I decided to reread one more time my configuration and I saw the error android12
must be android_12
... I don't know why I didn't see it before, I think I need to sleep more 😅 .
Thank you for your attention and for this awesome package! It saves a lot of time. When I have a little more economic slack, I will invite you to a coffee!
Thanks for the feedback @ivanhercaz and I'm glad you got it resolved. This gives me an idea though: the package should check each parameter and give the user an error message on an invalid parameter. I'll see if I can add this in the next version.
This gives me an idea though: the package should check each parameter and give the user an error message on an invalid parameter.
Wow! That's a great idea and a helpful hint help for distracted people like me 😅 .
Describe the bug
Splash screen is showing the same color and icon after follow all the required steps in the documentation of the package. I even tried to clean all the data of application in the smartphone, uninstall it, restart and install it again. I also retry all the process with a totally new application.
I really don't think it may be a real bug, but maybe some misunderstanding I am having, although it seems very simple, so I have not clear what is wrong.
Configuration
Device (please complete the following information):
To Reproduce Steps to reproduce the behavior, using the example app:
flutter_native_splash: ^2.3.4
todependencies
.dart run flutter_native_splash:create
flutter run
and check the log attached below to see if there is some error (it seems not):The only suspicious log line is:
But that's related with not having
WidgetsFlutterBinding.ensureInitialized();
beforerunApp(const MyApp());
, but doesn't affect to have it.Additional context
As I commented above, I really don't have clear if it is a bug or something I configured wrong, but it seems really strange to me because it even happens with a new application.
android/app/src/main/res/drawable/launch_background.xml
file has the correct code:Same in the other cases and in
drawable-hdpi
and other related directories, thesplash.png
is the correct image. The Flutter logo is just inmipmap-*
for the icon launcher,ic_launcher.png
. Invalues/styles.xml
there is:Does someone has any idea? Thank you very much in advance!
Regards, Iván