Flutter launcher_icon and native_splash android problem

Viewed 36

I am beginner in flutter, and I started learning from the very beginning of creating the application and immediately encountered a problem that I cannot solve only on android. When i create packages launcher_icon and native_splash, on ios everything works as it should, but on android at the splash screen all the time it gives me only the application icon and not default splash screen as in ios.

how could i fix it to work on android?

    dev_dependencies:
     flutter_test:
    sdk: flutter


  flutter_lints: ^2.0.0

  flutter_launcher_icons: ^0.10.0

  flutter_native_splash: ^2.2.7

flutter_icons:
  android: true
  ios: true
  image_path: "assets/icon_anny.png"
  min_sdk_android: 21

flutter_native_splash:
  color: "#fafafa"
  image: assets/splash_screen.png
  color_dark: "#000000"
  image_dark: assets/splash_screen_dark.png
  android: true
  ios: true
  android_gravity: fill
  ios_content_mode: scaleAspectFill
3 Answers

I managed to solve the problem, Android 12 has a different way of showing the splash screen. It is also necessary to open a new one flutter_native_splash.yaml and there are all the instructions and it works perfectly.

You should run a command line after adding parameters to pubspec.yaml:

flutter pub run flutter_native_splash:create
Related