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.33k stars 212 forks source link

`flutter_native_splash:create` changes the formatting of `AndroidManifest.xml` and `Info.plist` even if no changes were made #718

Open vanyasem opened 1 month ago

vanyasem commented 1 month ago

Describe the bug

flutter_native_splash:create changes the formatting of AndroidManifest.xml and Info.plist even if no changes were made

Configuration

flutter_native_splash:
  color: "#696969"
  android_screen_orientation: portrait
  image: assets_splash/splash.png
  android_gravity: center|bottom|clip_horizontal|clip_vertical
  ios_content_mode: scaleAspectFill
  web: false
  android_12:
    color: "#696969"

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

  1. Apply the splash screen by running flutter_native_splash:create
  2. Make formatting changes to AndroidManifest.xml/Info.plist
  3. Rerun flutter_native_splash:create
  4. Observe the fact that AndroidManifest.xml/Info.plist's formatting was changed, albeit no changes were made

Screenshots

Screenshot 2024-08-05 at 12 05 22

Additional context I'd suggest adding a flag that would instruct flutter_native_splash to not make any changes to AndroidManifest.xml/Info.plist, and only replace the images themselves for cases where only the image needs replacement

jonbhanson commented 1 month ago

Sorry, I will not have time to make this update. Feel free to submit a pull request to address this if you would like.

vanyasem commented 1 month ago

would you mind keeping the issue open and not marking is as completed? @jonbhanson