jonbhanson / flutter_native_splash

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.
https://pub.dev/packages/flutter_native_splash
MIT License
1.36k stars 215 forks source link

image gets cropped on android 12 #632

Closed FarisArmoush closed 12 months ago

FarisArmoush commented 12 months ago

Is your feature request related to a problem? Please describe. i added the package and here is the configuration below, the problem is the following, it works great on iOS devices, but on android the image is cropped into a circle in the middle if the screen.

Describe the solution you'd like my intended behavior is for the image to look on android exactly as it looks on iOS (images below)

Additional context I have tried all of the android_gravity properties and absolutely nothing changed.

flutter_native_splash:
  color: "#ffffff"
  color_dark: "#ffffff"
  image: assets/splash/splash.png
  image_dark: assets/splash/splash.png
  ios_content_mode: scaleAspectFill
  android_gravity: center_vertical
  ios: true
  android: true
  fullscreen: true
  android_12:
    image: assets/splash/splash.png
    color: "#ffffff"

Simulator Screenshot - iPhone 15 Pro - 2023-12-07 at 16 45 05 Screenshot_1701956654

jonbhanson commented 12 months ago

If you read the documentation, you will see that Android 12 and later do not support creating a splash screen with a full screen or background image. This is a limitation of Android, not this package.

FarisArmoush commented 12 months ago

If you read the documentation, you will see that Android 12 and later do not support creating a splash screen with a full screen or background image. This is a limitation of Android, not this package.

What can I do to fix this?

jonbhanson commented 11 months ago

What can I do to fix this?

You have to work within the constraints of the operating system. So in Android 12 and later, you need to build a splash screen that consists of a colored background and an image that fits within a circle in the center of the screen. Have you read the documentation?

FarisArmoush commented 11 months ago

What can I do to fix this?

You have to work within the constraints of the operating system. So in Android 12 and later, you need to build a splash screen that consists of a colored background and an image that fits within a circle in the center of the screen. Have you read the documentation?

I have read the documentation but I was asking to check if there is a way around it.