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

Android 12 color overrides background_image for Android 11 (and possibly more) #429

Closed
Bungeefan opened this issue Oct 3, 2022 · 1 comment

Comments

@Bungeefan
Copy link
Contributor

Attention: If you open a bug report without sufficient details, it will be closed. Is your question
related to Android 12? Please check the notes on Android 12 first (https://pub.dev/packages/flutter_native_splash#android-12-support).

Describe the bug

The package ignores the flutter_native_splash.background_image field, if android_12.color is set.

Configuration

flutter_native_splash:
  # This package generates native code to customize Flutter's default white native splash screen
  # with background color and splash image.
  # Customize the parameters below, and run the following command in the terminal:
  # flutter pub run flutter_native_splash:create
  # To restore Flutter's default white splash screen, run the following command in the terminal:
  # flutter pub run flutter_native_splash:remove

  background_image: assets/images/JVx_Bg.png

  image: assets/images/J.png

  #branding: assets/images/logo.png

  android_12:
    # The image parameter sets the splash screen icon image.  If this parameter is not specified,
    # the app's launcher icon will be used instead.
    # Please note that the splash screen will be clipped to a circle on the center of the screen.
    # App icon with an icon background: This should be 960×960 pixels, and fit within a circle
    # 640 pixels in diameter.
    # App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle
    # 768 pixels in diameter.
    image: assets/images/J.png

    # Splash screen background color.
    color: "#E3E3E3"

    # App icon background color.
    icon_background_color: "#DADADA"

    # The branding property allows you to specify an image used as branding in the splash screen.
    branding: assets/images/branding_sib_visions.png

  # The position of the splash image can be set with android_gravity, ios_content_mode, and
  # web_image_mode parameters.  All default to center.
  #
  # android_gravity can be one of the following Android Gravity (see
  # https://developer.android.com/reference/android/view/Gravity): bottom, center,
  # center_horizontal, center_vertical, clip_horizontal, clip_vertical, end, fill, fill_horizontal,
  # fill_vertical, left, right, start, or top.
  #android_gravity: center
  #
  # ios_content_mode can be one of the following iOS UIView.ContentMode (see
  # https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill,
  # scaleAspectFit, scaleAspectFill, center, top, bottom, left, right, topLeft, topRight,
  # bottomLeft, or bottomRight.
  #ios_content_mode: center
  #
  # web_image_mode can be one of the following modes: center, contain, stretch, and cover.
  #web_image_mode: center

  fullscreen: true

Device (please complete the following information):

  • Device: POCO M3 Pro 5G
  • OS: Android 11

To Reproduce
Steps to reproduce the behavior, using the example app:

  1. Set the config
  2. Run in an emulator
  3. See single color background even on devices before Android 12

Screenshots

Additional context

@jonbhanson
Copy link
Owner

Thanks for catching this. I will soon push out a release that will fix this bug.

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

2 participants