Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background_image Parameter not working #149

Closed
AndreBerzun opened this issue Mar 19, 2021 · 1 comment
Closed

background_image Parameter not working #149

AndreBerzun opened this issue Mar 19, 2021 · 1 comment

Comments

@AndreBerzun
Copy link

Thanks for this package, it's a real time saver 👍
Looking at the documentation though, I think this is a bug:

Describe the bug
Generating the splash screen seems to be only possible using the color attribute and not with a background_image.

To Reproduce
Using the following pubspec.yaml:

...
dev_dependencies:
  flutter_test:
    sdk: flutter
  mockito: ^4.1.3
  json_serializable: ^3.5.0
  build_runner: ^1.10.6
  flutter_launcher_icons: ^0.8.1
  flutter_native_splash: ^0.3.2

...

flutter_native_splash:
  background_image: assets/images/launch/launcher_background.png
  image: assets/images/launch/launcher_image.png
  android_gravity: fill_horizontal
  ios_content_mode: scaleAspectFit

I was not able to generate a splash screen.

The following message is printed to the terminal:

*** ERROR [flutter_native_splash] ***
InvalidConfigException
Your `flutter_native_splash` section does not contain a `color`.
pub finished with exit code 1

I thought I could use either a color or a background image?

Device (please complete the following information):

  • OS: Android 9

Flutter doctor

[✓] Flutter (Channel stable, 1.22.4, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.4 at /home/andre/development/flutter
    • Framework revision 1aafb3a8b9 (4 months ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/andre/Android/Sdk
    • Platform android-30, build-tools 29.0.2
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[!] Android Studio (version 3.3)
    • Android Studio at /opt/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (1 available)
    • TA 1012 (mobile) • NB1GAS3770900742 • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.

@AndreBerzun
Copy link
Author

I'm gonna save you the trouble :) Just found this issue #22
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant